[vhffs-dev] [525] Modified svn panel part to user new API.

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 525
Author:   beuss
Date:     2007-03-24 15:52:48 +0000 (Sat, 24 Mar 2007)

Log Message:
-----------
Modified svn panel part to user new API.

Modified Paths:
--------------
    branches/vhffs_4.1/vhffs-panel/svn/delete.pl
    branches/vhffs_4.1/vhffs-panel/svn/prefs.pl
    branches/vhffs_4.1/vhffs-panel/svn/prefs_save.pl


Modified: branches/vhffs_4.1/vhffs-panel/svn/delete.pl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/svn/delete.pl	2007-03-22 22:08:11 UTC (rev 524)
+++ branches/vhffs_4.1/vhffs-panel/svn/delete.pl	2007-03-24 15:52:48 UTC (rev 525)
@@ -64,15 +64,15 @@
 my $repo = $cgi->param( "name" );
 my $sure = $cgi->param( "DELETE" );
 
-my $svn = new Vhffs::Services::Svn( $vhffs , $repo , $user , $group );
+my $svn = Vhffs::Services::Svn::get_by_reponame( $vhffs , $repo );
 
 my $templatedir = $vhffs->get_config->get_templatedir;
 
-if( ( ! defined $repo ) || ( ! defined $svn ) || ( ! defined $sure ) )
+if( ( ! defined $repo ) || ( ! defined $sure ) )
 {
     $message = gettext("CGI Error !");
 }
-elsif( $svn->fetch < 0 )
+elsif( ! defined $svn )
 {
 	$message = gettext( "Cannot retrieve informations about this repository" );
 }

Modified: branches/vhffs_4.1/vhffs-panel/svn/prefs.pl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/svn/prefs.pl	2007-03-22 22:08:11 UTC (rev 524)
+++ branches/vhffs_4.1/vhffs-panel/svn/prefs.pl	2007-03-24 15:52:48 UTC (rev 525)
@@ -70,25 +70,24 @@
 
 if( defined $cgigroupname )
 {
-	$group = new Vhffs::Group( $vhffs , $cgigroupname , '401' );
-	$group->fetch;
+	$group = Vhffs::Group::get_by_groupname( $vhffs , $cgigroupname );
 }
 
-$svn = new Vhffs::Services::Svn( $vhffs , $repo_name  , undef , $group );
+$svn = Vhffs::Services::Svn::get_by_reponame( $vhffs , $repo_name );
 
 
-if( ( ! defined $repo_name ) || ( ! defined $svn ) )
+if( ! defined $repo_name )
 {
 	$template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
 	$message = gettext( "CGI Error" );
 	$template->param( MESSAGE => $message );
 }
-elsif( ( ! defined $group ) || ( $group->fetch < 0 ) )
+elsif( ! defined $group )
 {
 	$template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
 	$template->param( MESSAGE => gettext("Grant an user access to this repository") );
 }
-elsif( $svn->fetch < 0 )
+elsif( !defined $svn )
 {
 	$template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
 	$message = gettext( "Cannot get informations on this object");

Modified: branches/vhffs_4.1/vhffs-panel/svn/prefs_save.pl
===================================================================
--- branches/vhffs_4.1/vhffs-panel/svn/prefs_save.pl	2007-03-22 22:08:11 UTC (rev 524)
+++ branches/vhffs_4.1/vhffs-panel/svn/prefs_save.pl	2007-03-24 15:52:48 UTC (rev 525)
@@ -73,7 +73,7 @@
 {
     $message = sprintf( gettext("CGI Error ! %s"), $repo );
 }
-elsif( ! defined($svn->fetch) )
+elsif( ! defined($svn) )
 {
 	$message = gettext( "Cannot retrieve informations about this Subversion repository" );
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/