[vhffs-dev] [469] Removed all references to vhffs_groups_info

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


Revision: 469
Author:   beuss
Date:     2007-02-17 10:48:42 +0000 (Sat, 17 Feb 2007)

Log Message:
-----------
Removed all references to vhffs_groups_info

Modified Paths:
--------------
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Group.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Group.pm


Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Group.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Group.pm	2007-02-17 10:39:40 UTC (rev 468)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Group.pm	2007-02-17 10:48:42 UTC (rev 469)
@@ -459,13 +459,7 @@
     
     
     $request = $self->{'db'}->prepare('DELETE FROM vhffs_groups WHERE gid=?');
-    # THIS IS NOT USEFUL, FOREIGN KEY CONSTRAINTS DO THE JOB
-    #$request2 = $self->{'db'}->prepare('DELETE FROM vhffs_user_group WHERE gid=?');
-    #$request3 = $self->{'db'}->prepare('DELETE FROM vhffs_groups_info WHERE gid=?');
-    
     $request->execute($self->{'gid'}) or return -1;
-    #$request2->execute($self->{'gid'}) or return -2;
-    #$request3->execute($self->{'gid'}) or return -2;    
     
     $self->SUPER::delete;
 

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Group.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Group.pm	2007-02-17 10:39:40 UTC (rev 468)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Panel/Group.pm	2007-02-17 10:48:42 UTC (rev 469)
@@ -85,7 +85,7 @@
 {
     my( $main , $query , $request);
     $main = shift;
-	$query = "SELECT o.description ,  u.username , g.groupname , o.object_id FROM vhffs_object o , vhffs_users u , vhffs_groups g  , vhffs_groups_info gi WHERE u.uid=gi.owner_uid AND gi.gid=g.gid AND u.username!=g.groupname AND g.object_id=o.object_id AND o.state='".Vhffs::Constants::WAITING_FOR_VALIDATION."'";
+	$query = "SELECT o.description ,  u.username , g.groupname , o.object_id FROM vhffs_groups g INNER JOIN vhffs_object o ON o.object_id = g.object_id INNER JOIN vhffs_users ON u.uid = g.owner_uid WHERE u.username!=g.groupname AND o.state='".Vhffs::Constants::WAITING_FOR_VALIDATION."'";
     $request = $main->{'db'}->prepare( $query );
 
     return undef if ( $request->execute <= 0 );


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