[vhffs-dev] [svn] commit: r214 - in /trunk/vhffs-api/src/Vhffs: Object.pm User.pm |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Author: soda
Date: Fri Aug 11 16:15:39 2006
New Revision: 214
Log:
Change, use now template request
Update User.pm, delete old methods
Modified:
trunk/vhffs-api/src/Vhffs/Object.pm
trunk/vhffs-api/src/Vhffs/User.pm
Modified: trunk/vhffs-api/src/Vhffs/Object.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/Object.pm (original)
+++ trunk/vhffs-api/src/Vhffs/Object.pm Fri Aug 11 16:15:39 2006
@@ -139,9 +139,9 @@
$id = $request->[0][0] if( defined $request->[0][0] );
$id++;
$self->{'object_id'} = $id;
- $request = $self->{'db'}->{'DB_WRITE'}->prepare("INSERT INTO vhffs_object VALUES ( '".$self->{'object_id'}."','".$self->{'owner_uid'}."' , NOW(), '".$self->{'state'}."','".$self->{'description'}."')");
-
- $request->execute or return -2;
+ $request = $self->{'db'}->{'DB_WRITE'}->prepare("INSERT INTO vhffs_object VALUES ( ? , ? , NOW(), ? , ? )");
+
+ $request->execute( $self->{'object_id'} , $self->{'owner_uid'} , $self->{'state'} , $self->{'description'} ) or return -2;
$self->add_history( "Object created" );
Modified: trunk/vhffs-api/src/Vhffs/User.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/User.pm (original)
+++ trunk/vhffs-api/src/Vhffs/User.pm Fri Aug 11 16:15:39 2006
@@ -148,39 +148,6 @@
$self->SUPER::fetch;
return 1;
}
-
-
-
-#get the unix informations for all users
-sub get_all_unix_users
-{
- my $dbh;
- my $result;
-
- $dbh = shift;
-
- $result = $dbh->selectall_hashref("SELECT * FROM vhffs_users" , "uid") || die( "cannot execute the fetch of all users" );
-
- return $result;
-}
-
-
-
-
-
-# the same as get_user, but fetch all user and informations about them
-sub get_all_users
-{
- my $dbh;
- my $result;
-
- $dbh = shift;
-
- $result = $dbh->selectall_hashref("SELECT * FROM vhffs_users vu , vhffs_user_info vui WHERE vu.uid=vui.uid" , "uid") || die( "cannot execute the fetch of all users" );
-
- return $result;
-}
-
#add a user to a group