[vhffs-dev] [svn] commit: r124 - in /trunk: vhffs-api/src/Vhffs/Object.pm vhffs-intl/result/fr_FR/LC_MESSAGES/vhffs.mo vhffs-panel/panel.pl vhffs-robots/src/delete_users.pl

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


Author: soda
Date: Mon Dec 19 19:29:44 2005
New Revision: 124

Log:
Objects delete notes
fix bug in delete_users robot
fix bug in the main page in panel


Modified:
    trunk/vhffs-api/src/Vhffs/Object.pm
    trunk/vhffs-intl/result/fr_FR/LC_MESSAGES/vhffs.mo
    trunk/vhffs-panel/panel.pl
    trunk/vhffs-robots/src/delete_users.pl

Modified: trunk/vhffs-api/src/Vhffs/Object.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Object.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Object.pm Mon Dec 19 19:29:44 2005
@@ -75,16 +75,22 @@
 	my $request;
 
 
-
+	#First, delete all Notes pointing on this object
+    $query = "DELETE FROM vhffs_notes WHERE object_id='".$self->{'object_id'}."'";
+    $request = $self->{'db'}->{'DB_WRITE'}->prepare($query);
+    $request->execute or return -2;
+
+	#Then, delete all ACL referes to this object
     $query = "DELETE FROM vhffs_acl WHERE oid_dst='".$self->{'object_id'}."'";
     $request = $self->{'db'}->{'DB_WRITE'}->prepare($query);
     $request->execute or return -2;
-    
+   
+   	#Delete all ACL from this object
 	$query = "DELETE FROM vhffs_acl WHERE oid_src='".$self->{'object_id'}."'";
     $request = $self->{'db'}->{'DB_WRITE'}->prepare($query);
     $request->execute or return -2;
 
-
+	#Delete history from this object
     $query = "DELETE FROM vhffs_history WHERE object_id='".$self->{'object_id'}."'";
     $request = $self->{'db'}->{'DB_WRITE'}->prepare($query);
     $request->execute or return -1;

Modified: trunk/vhffs-intl/result/fr_FR/LC_MESSAGES/vhffs.mo
==============================================================================
Binary files - no diff available.

Modified: trunk/vhffs-panel/panel.pl
==============================================================================
--- trunk/vhffs-panel/panel.pl (original)
+++ trunk/vhffs-panel/panel.pl Mon Dec 19 19:29:44 2005
@@ -65,12 +65,12 @@
 	$template = new HTML::Template( filename => $templatedir."/misc/simplemsg.tmpl" );
 	$template->param( MESSAGE => $message );
 }
-elsif( ( defined $projectname ) && ( $projectname eq "none" )  )  {
-	$template = project_info Vhffs::Panel::Main($vhffs , $session , $user);
+elsif( ( defined $projectname ) && ( $projectname == "none" )  )  {
+	$template = right_first Vhffs::Panel::Main($vhffs , $session , $user);
 }
 else
 {
-	$template = right_first Vhffs::Panel::Main($vhffs , $session , $user);
+	$template = project_info Vhffs::Panel::Main($vhffs , $session , $user);
 }
 
 display Vhffs::Panel::Main($panel, $template->output);

Modified: trunk/vhffs-robots/src/delete_users.pl
==============================================================================
--- trunk/vhffs-robots/src/delete_users.pl (original)
+++ trunk/vhffs-robots/src/delete_users.pl Mon Dec 19 19:29:44 2005
@@ -36,7 +36,7 @@
 		
 		if( $ok == 1 )
 		{
-			printf "\tSuppression du user\n";
+			vhffs_log( sprintf( "USER delete user %s" , $user->get_username ) );
         	if( Vhffs::Robots::User::delete( $vhffs, $user ) < 0 )
 			{
 				Vhffs::Robots::vhffs_log( sprintf("Cannot delete user files %s" , $user->get_username ) );




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