[vhffs-dev] [svn] commit: r73 - trunk/vhffs-api/src/Vhffs/Panel trunk/vhffs-api/src/Vhffs/Services trunk/vhffs-panel/cvs trunk/vhffs-panel/svn trunk/vhffs-panel/themes/tuxfamily trunk/vhffs-panel/themes/tuxfamily/images trunk/vhffs-robots/src

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


Author: soda
Date: Thu Jul 28 22:12:34 2005
New Revision: 73

Log:
fix some bugs


Modified:
    trunk/vhffs-api/src/Vhffs/Panel/Svn.pm
    trunk/vhffs-api/src/Vhffs/Services/Cvs.pm
    trunk/vhffs-panel/cvs/prefs.pl
    trunk/vhffs-panel/cvs/prefs_save.pl
    trunk/vhffs-panel/svn/create.pl
    trunk/vhffs-panel/themes/tuxfamily/images/logo.png
    trunk/vhffs-panel/themes/tuxfamily/main.css
    trunk/vhffs-robots/src/cvs_fixperms.pl
    trunk/vhffs-robots/src/delete_cvs.pl
    trunk/vhffs-robots/src/delete_svn.pl

Modified: trunk/vhffs-api/src/Vhffs/Panel/Svn.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Svn.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Panel/Svn.pm Thu Jul 28 22:12:34 2005
@@ -150,6 +150,16 @@
 			$subtemplate->param( OID => $repos->{$_}{'object_id'});
 			$output .= $subtemplate->output;
 		}
+        elsif( $repos->{$_}{'state'} == Vhffs::Constants::TO_DELETE )
+        {
+            $subtemplate = new HTML::Template( filename => "$templatesdir/svn/menu_sub_wait.tmpl" );
+            $subtemplate->param( NAME => "$_");
+            $subtemplate->param( REASON => gettext( "Waiting for delete" ) );
+            $subtemplate->param( HISTORY => gettext("History"));
+            $subtemplate->param( OID => $repos->{$_}{'object_id'});
+            $output .= $subtemplate->output;
+        }
+
 	}
 
 	$template->param( SUB_SVN => $output );

Modified: trunk/vhffs-api/src/Vhffs/Services/Cvs.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Services/Cvs.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Services/Cvs.pm Thu Jul 28 22:12:34 2005
@@ -92,7 +92,7 @@
 
 
 	#Finally, create the object
-	my $text = "INSERT INTO vhffs_cvs VALUES( '".$cvs_id."' , '".$self->{'cvsroot'} . "','".$self->{'user'}->get_uid."','".$self->{'group'}->get_gid."' , 'FALSE' , '".$self->{'object_id'}."' )";
+	my $text = "INSERT INTO vhffs_cvs VALUES( '".$cvs_id."' , '".$self->{'cvsroot'} . "','".$self->{'user'}->get_uid."','".$self->{'group'}->get_gid."' , 'TRUE' , '".$self->{'object_id'}."' )";
 	$request = $self->{'db'}->{'DB_WRITE'}->prepare( $text );
 	$request->execute or return -2;
 

Modified: trunk/vhffs-panel/cvs/prefs.pl
==============================================================================
--- trunk/vhffs-panel/cvs/prefs.pl (original)
+++ trunk/vhffs-panel/cvs/prefs.pl Thu Jul 28 22:12:34 2005
@@ -58,7 +58,7 @@
 elsif( $cvs->get_status != Vhffs::Constants::ACTIVATED )
 {
 	$template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
-    $message = gettext( "This object is not functionnal yet. Please wait creation or moderation.");
+    $message = gettext( "This object is not functionnal yet. Please wait creation, moderation or modification.");
 	$template->param( MESSAGE => $message );
 }
 else

Modified: trunk/vhffs-panel/cvs/prefs_save.pl
==============================================================================
--- trunk/vhffs-panel/cvs/prefs_save.pl (original)
+++ trunk/vhffs-panel/cvs/prefs_save.pl Thu Jul 28 22:12:34 2005
@@ -65,15 +65,15 @@
 	    
 	    $cvs->set_private;
 	}
-	
+	$cvs->set_status( Vhffs::Constants::WAITING_FOR_MODIFICATION );	
 	# Commit all the changes for the current user
 	if( $cvs->commit < 0 )
 	{
-	        $message .= gettext("Error occured while updating project");
+	        $message .= gettext("Error occured while updating CVS repository");
 	}  
 	else  
 	{
-        $message .= gettext("Project Successfully modified");
+        $message .= gettext("CVS repository successfully modified");
 	}
 }
 

Modified: trunk/vhffs-panel/svn/create.pl
==============================================================================
--- trunk/vhffs-panel/svn/create.pl (original)
+++ trunk/vhffs-panel/svn/create.pl Thu Jul 28 22:12:34 2005
@@ -27,16 +27,23 @@
 my $group = $panel->{'group'};
 
 my $templatedir = $vhffs->get_config->get_templatedir;
+my $template;
+if( ! defined $group )
+{
+	$template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
+	$template->param( MESSAGE => gettext("CGI Error") );
+}
+else
+{
+	$template = new HTML::Template( filename => $templatedir."/svn/create.tmpl" );
 
-my $template = new HTML::Template( filename => $templatedir."/svn/create.tmpl" );
-
-$template->param( TITLE => gettext("Create a Subversion Repository") );
-$template->param( REPOSITORY_NAME => gettext("Repository Name") );
-$template->param( GROUP_NAME => gettext("Group owner for this Subversion repository") );
+	$template->param( TITLE => gettext("Create a Subversion Repository") );
+	$template->param( REPOSITORY_NAME => gettext("Repository Name") );
+	$template->param( GROUP_NAME => gettext("Group owner for this Subversion repository") );
 
 
-$template->param( GROUP => $group->get_groupname );
-$template->param( SEND => gettext("Send") );
-$template->param( DESCRIPTION => gettext("Description") );
-
+	$template->param( GROUP => $group->get_groupname );
+	$template->param( SEND => gettext("Send") );
+	$template->param( DESCRIPTION => gettext("Description") );
+}
 display Vhffs::Panel::Main($panel, $template->output);

Modified: trunk/vhffs-panel/themes/tuxfamily/images/logo.png
==============================================================================
Binary files - no diff available.

Modified: trunk/vhffs-panel/themes/tuxfamily/main.css
==============================================================================
--- trunk/vhffs-panel/themes/tuxfamily/main.css (original)
+++ trunk/vhffs-panel/themes/tuxfamily/main.css Thu Jul 28 22:12:34 2005
@@ -6,22 +6,42 @@
 	width:100%;
 }
 
+input, textarea, select {
+ background-color: #ffcf39;
+ color: black;
+ border: thin solid black;
+ -moz-border-radius: 4px;
+}
+
+input:hover, textarea:hover, select:hover
+{
+        background-color: #ffe739;
+}
+
+
 body
 {
     margin: 0px;
     padding: 0px;
     color: black;
-    background-color: #ffffff;
+    background-color: #218eb5;
     font-family:"Trebuchet MS",Verdana,Geneva,Arial,Helvetica,sans-serif;
     font-size: small;
 }
 
 a:link, a:visited, a:hover
 {
-    color: #f60;
+    color: #630000;
     background-color: transparent;
     font-weight: 700;
     text-decoration: none;
+}
+
+.menu
+{
+	margin-left: 5px;
+	background-color: #e76d00;
+	color: #630000;
 }
 
 .menu a:hover
@@ -70,6 +90,7 @@
 {
     display:block;
     background-image:url("./images/logo.png");
+	background-color: #630000;
     text-align:right;
     width:100%;
     height:131px;
@@ -87,7 +108,7 @@
 
 .main
 {
-    background-color: #f5f8fc;
+    background-color: #e76d00;
     padding: 1em;
     border: 1px dotted #555;
     margin-left:280px;
@@ -140,7 +161,7 @@
     margin-top:0px;
     padding-top:10px;
     padding-bottom:20px;
-    color: #ff6600;
+    color: #630000;
 }
 
 .message

Modified: trunk/vhffs-robots/src/cvs_fixperms.pl
==============================================================================
--- trunk/vhffs-robots/src/cvs_fixperms.pl (original)
+++ trunk/vhffs-robots/src/cvs_fixperms.pl Thu Jul 28 22:12:34 2005
@@ -15,7 +15,7 @@
 use Vhffs::Services::Cvs;
 
 my $main = init Vhffs::Main;
-my $cvss = Vhffs::Services::Cvs::getall( $main , Vhffs::Constants::ACTIVATED );
+my $cvss = Vhffs::Services::Cvs::getall( $main , Vhffs::Constants::WAITING_FOR_MODIFICATION );
 my $cvs;
 my $dir;
 
@@ -24,10 +24,14 @@
 {
 	if( $cvs->is_public == 0 )
 	{
+		$cvs->add_history("CVS is now private");
 		Vhffs::Functions::chmod_recur( $cvs->get_dir , 0660 , 02770 );
 	}
 	else
 	{
+		$cvs->add_history("CVS is now public");
 		Vhffs::Functions::chmod_recur( $cvs->get_dir , 0664 , 02775 );
 	}
+	$cvs->set_status( Vhffs::Constants::ACTIVATED );
+	$cvs->commit;
 }

Modified: trunk/vhffs-robots/src/delete_cvs.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_cvs.pl (original)
+++ trunk/vhffs-robots/src/delete_cvs.pl Thu Jul 28 22:12:34 2005
@@ -2,19 +2,21 @@
 
 
 use Vhffs::Robots::Cvs;
+use Vhffs::Services::Cvs;
+use Vhffs::Constants;
 use Vhffs::Main;
 
 
 my $main = init Vhffs::Main;
-my $lol = Vhffs::Robots::Cvs::getall_cvs_to_delete( $main );
+my $lol = Vhffs::Services::Cvs::getall( $main , Vhffs::Constants::TO_DELETE );
 my $cvs;
 
-foreach( keys %{$lol} )
+foreach $cvs ( @{$lol} )
 {
-    my $cvs = new Vhffs::Services::Cvs( $main , $_ );
     if( ( defined $cvs ) && ( $cvs->fetch > 0 ))
     {
         Vhffs::Robots::Cvs::delete_cvs( $cvs );
+	$cvs->delete;
     }
 }
 

Modified: trunk/vhffs-robots/src/delete_svn.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_svn.pl (original)
+++ trunk/vhffs-robots/src/delete_svn.pl Thu Jul 28 22:12:34 2005
@@ -13,6 +13,7 @@
 	if( $svn->fetch >= 0)
 	{
 		Vhffs::Robots::Svn::delete_repo( $vhffs , $svn );
+		$svn->delete;
 	}
 }
 




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