[vhffs-dev] [517] Object type is now filled

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


Revision: 517
Author:   beuss
Date:     2007-03-20 18:51:30 +0000 (Tue, 20 Mar 2007)

Log Message:
-----------
Object type is now filled

Modified Paths:
--------------
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Group.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Cvs.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Httpd.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mail.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mysql.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Postgres.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Repository.pm
    branches/vhffs_4.1/vhffs-api/src/Vhffs/User.pm


Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Group.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Group.pm	2007-03-20 15:47:07 UTC (rev 516)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Group.pm	2007-03-20 18:51:30 UTC (rev 517)
@@ -221,7 +221,7 @@
     my $dbh = $main->get_db_object;
     my $groupconf = $main->get_config->get_users;
 
-    my $parent = Vhffs::Object::create($main, $owner_uid, $description);
+    my $parent = Vhffs::Object::create($main, $owner_uid, $description, undef, Vhffs::Constants::TYPE_GROUP);
     return undef unless(defined $parent);
     
     my $quota = $groupconf->{default_quota} || 10;
@@ -820,7 +820,7 @@
 sub _new {
     no strict 'refs';
     my ($class, $main, $gid, $oid, $owner_uid, $uid_mod, $groupname, $passwd, $quota, $quota_used, $date_creation, $description, $state) = @_;
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_GROUP);
     return undef unless(defined $self);
     foreach (qw (gid uid_mod groupname passwd quota quota_used) ) {
         eval '$self->{$_} = $'.$_;

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Cvs.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Cvs.pm	2007-03-20 15:47:07 UTC (rev 516)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Cvs.pm	2007-03-20 18:51:30 UTC (rev 517)
@@ -102,7 +102,7 @@
     return undef unless(defined($user) && defined($group));
     return undef unless(defined($cvsroot) && ($cvsroot =~ /^[a-z0-9]+$/));
 
-    my $parent = Vhffs::Object::create($main, $user->get_uid, $description);
+    my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_CVS);
 
     return undef unless(defined($parent));
 
@@ -293,7 +293,7 @@
 sub _new {
     my ($class, $main, $cvs_id, $cvsroot, $owner_uid, $owner_gid, $public, $oid, $date_creation, $description, $state) = @_;
     
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_CVS);
     return undef unless(defined $self);
     
     $self->{cvsroot} = $cvsroot;

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Httpd.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Httpd.pm	2007-03-20 15:47:07 UTC (rev 516)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Httpd.pm	2007-03-20 18:51:30 UTC (rev 517)
@@ -95,7 +95,7 @@
     return undef unless(defined($user) && defined($group));
     return undef unless(Vhffs::Functions::check_domain_name($servername));
 
-    my $parent =  Vhffs::Object::create($main, $user->get_uid, $description);
+    my $parent =  Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_HTTPD);
     
     return undef unless(defined($parent));
 
@@ -438,7 +438,7 @@
 sub _new {
     my ($class, $main, $httpd_id, $servername, $crawl, $owner_http, $owner_rev, $owner_uid, $owner_gid, $trafic, $alert_state, $alert_limit, $oid, $date_creation, $description, $state) = @_;
 
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_HTTPD);
     return undef unless(defined($self));
 
     foreach (qw(httpd_id servername crawl owner_http owner_rev owner_gid trafic alert_state alert_limit)) {

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mail.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mail.pm	2007-03-20 15:47:07 UTC (rev 516)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mail.pm	2007-03-20 18:51:30 UTC (rev 517)
@@ -627,7 +627,7 @@
 
 sub _new {
     my ($class, $main, $mxdomain_id, $owner_gid, $domain, $unix_user, $boxes_path, $max_popbox, $catchall, $oid, $owner_uid, $date_creation, $state, $description, $boxes, $forwards) = @_;
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_MAIL);
     return undef unless defined($self);
     
     $self->{mxdomain_id} = $mxdomain_id;

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mysql.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mysql.pm	2007-03-20 15:47:07 UTC (rev 516)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mysql.pm	2007-03-20 18:51:30 UTC (rev 517)
@@ -277,7 +277,7 @@
 
 sub _new {
     my ($class, $main, $mysql_id, $owner_gid, $dbname, $dbuser, $dbpass, $oid, $owner_uid, $date_creation, $state, $description) = @_;
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs:Constants::TYPE_MYSQL);
     return undef unless(defined $self);
 
     $self->{mysql_id} = $mysql_id;

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Postgres.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Postgres.pm	2007-03-20 15:47:07 UTC (rev 516)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Postgres.pm	2007-03-20 18:51:30 UTC (rev 517)
@@ -289,7 +289,7 @@
 
 sub _new {
     my ($class, $main, $pgsql_id, $owner_gid, $dbname, $dbuser, $dbpass, $oid, $owner_uid, $date_creation, $state, $description) = @_;
-    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state);
+    my $self = $class->SUPER::_new($main, $oid, $owner_uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_PGSQL);
     return undef unless(defined $self);
 
     $self->{pgsql_id} = $pgsql_id;

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Repository.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Repository.pm	2007-03-20 15:47:07 UTC (rev 516)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Repository.pm	2007-03-20 18:51:30 UTC (rev 517)
@@ -108,7 +108,7 @@
     return undef unless(defined($user) && defined($group));
     return undef unless(check_name($rname));
 
-    my $parent = Vhffs::Object::create($main, $user->get_uid, $description);
+    my $parent = Vhffs::Object::create($main, $user->get_uid, $description, undef, Vhffs::Constants::TYPE_REPOSITORY);
 
     return undef unless(defined $parent);
 

Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/User.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/User.pm	2007-03-20 15:47:07 UTC (rev 516)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/User.pm	2007-03-20 18:51:30 UTC (rev 517)
@@ -80,7 +80,7 @@
 
 sub _new {
     my ($class, $main, $uid, $gid, $oid, $username, $passwd, $homedir, $shell, $admin, $firstname, $lastname, $address, $zipcode, $city, $country, $mail, $gpg_key, $note, $language, $theme, $date_creation, $description, $state) = @_;
-    my $self = $class->SUPER::_new($main, $oid, $uid, $date_creation, $description, $state);
+    my $self = $class->SUPER::_new($main, $oid, $uid, $date_creation, $description, $state, Vhffs::Constants::TYPE_USER);
     return undef unless(defined $self);
     $self->{uid} = $uid;
     $self->{gid} = $gid;
@@ -242,7 +242,7 @@
         my ($gid) = $dbh->selectrow_array('SELECT nextval(\'vhffs_groups_gid_seq\')');
         
         # Create corresponding object
-        my $parent = Vhffs::Object::create($main, $uid, '', Vhffs::Constants::WAITING_FOR_CREATION);
+        my $parent = Vhffs::Object::create($main, $uid, '', undef, Vhffs::Constants::TYPE_USER);
         die('Error creating parent') unless (defined $parent);
 
         # Insert base information


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