[vhffs-dev] [487] Removed some deprecated calls from Stats.pl, removed a debug statement in Mail.pm

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


Revision: 487
Author:   beuss
Date:     2007-02-19 11:11:36 +0000 (Mon, 19 Feb 2007)

Log Message:
-----------
Removed some deprecated calls from Stats.pl, removed a debug statement in Mail.pm

Modified Paths:
--------------
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mail.pm
    branches/vhffs_4.1/vhffs-tests/src/Stats.pl


Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mail.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mail.pm	2007-02-19 10:57:50 UTC (rev 486)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mail.pm	2007-02-19 11:11:36 UTC (rev 487)
@@ -202,7 +202,6 @@
     #                      - $ref->{'boxes'}{$local_part}{'mbox_name'}
     #                      - $ref->{'boxes'}{$local_part}{'password'}
     $request = $self->{'db'}->prepare("SELECT * FROM vhffs_boxes where domain='".$self->{'domain'}."'") or return -1;
-    print "SELECT * FROM vhffs_boxes where domain='".$self->{'domain'}."'";
     $request->execute() or return -3;
     $result = $request->fetchall_hashref('local_part');	
 

Modified: branches/vhffs_4.1/vhffs-tests/src/Stats.pl
===================================================================
--- branches/vhffs_4.1/vhffs-tests/src/Stats.pl	2007-02-19 10:57:50 UTC (rev 486)
+++ branches/vhffs_4.1/vhffs-tests/src/Stats.pl	2007-02-19 11:11:36 UTC (rev 487)
@@ -28,31 +28,23 @@
 Vhffs::Tests::Utils::init_db($main->get_db_object);
 
 for(my $i = 1 ; $i < 10 ; ++$i) {
-    $user = new Vhffs::User($main, "testuser0$i", 401);
-    # User must have a password if we want to commit it later
-    $user->set_password('dummy');
-    $user->create;
+    Vhffs::User::create($main, "testuser0$i", 'dummy', Vhffs::Constants::USER_NORMAL, "testuser0$i\@test.com");
 }
 
 for(my $i = 1 ; $i < 10 ; ++$i) {
-    $user = new Vhffs::User($main, "testuser0$i", 401);
-    $user->fetch;
-    $group = new Vhffs::Group($main, "testgroup0$i", $user->get_uid);
-    $group->create;
+    $user = Vhffs::User::get_by_username($main, "testuser0$i");
+    Vhffs::Group::create($main, "testgroup0$i", $user->get_uid);
 }
 
-$user = new Vhffs::User($main, 'testuser01', 401);
-$user->fetch;
+$user = Vhffs::User::get_by_username($main, 'testuser01');
 $user->set_admin(Vhffs::Constants::USER_ADMIN);
 $user->commit();
 
-$user = new Vhffs::User($main, 'testuser04', 401);
-$user->fetch;
+$user = Vhffs::User::get_by_username($main, 'testuser04');
 $user->set_admin(Vhffs::Constants::USER_ADMIN);
 $user->commit();
 
-$user = new Vhffs::User($main, 'testuser02', 401);
-$user->fetch;
+$user = Vhffs::User::get_by_username($main, 'testuser02');
 $user->set_admin(Vhffs::Constants::USER_MODERATOR);
 $user->commit();
 


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