ispman/lib/ISPMan UserMan.pm,1.53,1.54 DomainMan.pm,1.79,1.80

Atif Ghaffar <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18000

Modified Files:
	UserMan.pm DomainMan.pm 
Log Message:
Passing Process parameters by name as in URL

Index: UserMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/UserMan.pm,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- UserMan.pm	30 Dec 2004 01:02:38 -0000	1.53
+++ UserMan.pm	30 Dec 2004 01:26:32 -0000	1.54
@@ -231,7 +231,6 @@
 
     print "Deleting $dn<br>";
     $self->{'user'} = $self->{'ldap'}->getEntryAsHashRef($dn);
-    print $self->html_dumper($self->{'user'});
 
 
     #it is possible that as user has multiple uids.

Index: DomainMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/DomainMan.pm,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -d -r1.79 -r1.80
--- DomainMan.pm	15 Jul 2004 07:43:49 -0000	1.79
+++ DomainMan.pm	30 Dec 2004 01:26:32 -0000	1.80
@@ -279,25 +279,27 @@
     if ( $r->param("ispmanDomainType") eq "replica" ) {
 
         # Add entry for canonical map
-        $self->addDomainSMTPProcess( $r->param("ispmanDomain"),
-            "AddCanonicalMapEntry", $r->param("ispmanReplicaMaster") );
+        $self->addDomainSMTPProcess( $r->param("ispmanDomain"),"AddCanonicalMapEntry", "ispmanReplicaMaster=" .$r->param("ispmanReplicaMaster") );
 
         # Update ServerAliases for vhosts of MasterDomain
         my $vhosts = $self->getApacheVhosts( $r->param("ispmanReplicaMaster") );
         for my $vhost ( keys %$vhosts ) {
             $self->addVhostProcess(
                 $r->param("ispmanReplicaMaster"), $vhost,
-                "ModifyVirtualHost",              $vhost
+                "ModifyVirtualHost",              "vhost=$vhost"
             );
         }
-    }
-    else {
+    } else {
 
         # Create directories for this domain
         # send the task to addDomainFileServerProcess.
         # It will add it to host or group
-        $self->addDomainFileServerProcess( $r->param("ispmanDomain"),
-            "createDomainDirectories" );
+        # Give directory, uid, gid information
+       my $_domainInfo=$self->getDomainInfo($r->param("ispmanDomain"));
+
+        $self->addDomainFileServerProcess( $r->param("ispmanDomain"),"createDomainDirectories" ,
+        "homeDirectory=$_domainInfo->{'homeDirectory'}&uidNumber=$_domainInfo->{'uidNumber'}&gidNumber=$_domainInfo->{'gidNumber'}"
+        );
     }
 
     # add domain to mail relay map for delivery method "smtp"
@@ -443,7 +445,7 @@
           $self->getApacheVhosts( $domain_info->{"ispmanReplicaMaster"} );
         for my $vhost ( keys %$vhosts ) {
             $self->addVhostProcess( $domain_info->{"ispmanReplicaMaster"},
-                $vhost, "ModifyVirtualHost", $vhost );
+                $vhost, "ModifyVirtualHost", "vhost=$vhost" );
         }
 
     }
@@ -453,8 +455,8 @@
         # send the task to addDomainFileServerProcess.
         # It will add it to host or group
         $self->addDomainFileServerProcess( $domain, "deleteDomainDirectories",
-            join ',',
-            map { $domain_info->{$_} } qw(homeDirectory uidNumber gidNumber) );
+            join '&',
+            map { "$_=$domain_info->{$_}" } qw(homeDirectory uidNumber gidNumber) );
     }
 
     # Remove this domain from RelayDomains
@@ -631,8 +633,7 @@
             if ( $domain_info->{'ispmanReplicaMaster'} ne
                 $r->param("ispmanReplicaMaster") )
             {
-                $self->addDomainSMTPProcess( $domain, "AddCanonicalMapEntry",
-                    $r->param("ispmanReplicaMaster") );
+                $self->addDomainSMTPProcess( $domain, "AddCanonicalMapEntry", "ispmanReplicaMaster=" . $r->param("ispmanReplicaMaster") );
                 $self->addDomainDNSProcess( $domain, "modifyDomain" );
 
                 # Update ServerAliases for vhosts of old MasterDomain
@@ -642,7 +643,7 @@
                 for my $vhost ( keys %$vhosts ) {
                     $self->addVhostProcess(
                         $domain_info->{"ispmanReplicaMaster"},
-                        $vhost, "ModifyVirtualHost", $vhost );
+                        $vhost, "ModifyVirtualHost", "vhost=$vhost" );
                 }
 
                 # Update ServerAliases for vhosts of new MasterDomain
@@ -651,7 +652,7 @@
                 for my $vhost ( keys %$vhosts ) {
                     $self->addVhostProcess(
                         $r->param("ispmanReplicaMaster"), $vhost,
-                        "ModifyVirtualHost",              $vhost
+                        "ModifyVirtualHost",              "vhost=$vhost"
                     );
                 }
 



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.