CVS: ispman/lib/ISPMan DomainMan.pm,1.52,1.53

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/lib/ISPMan
In directory sc8-pr-cvs1:/tmp/cvs-serv29090/lib/ISPMan

Modified Files:
	DomainMan.pm 
Log Message:
Fixed bug #520706 (no ModifyVirtualHost for new replicas) 
(forgot the update/delete of replicas)


Index: DomainMan.pm
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/ISPMan/DomainMan.pm,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -r1.52 -r1.53
*** DomainMan.pm	8 Jan 2004 09:59:39 -0000	1.52
--- DomainMan.pm	8 Jan 2004 10:28:31 -0000	1.53
***************
*** 422,425 ****
--- 422,432 ----
     if ($domain_info->{"ispmanDomainType"} eq "replica") {
        $self->addDomainSMTPProcess($domain, "RemoveCanonicalMapEntry");
+ 
+       # Update ServerAliases for vhosts of MasterDomain
+       my $vhosts=$self->getApacheVhosts($domain_info->{"ispmanReplicaMaster"});
+       for my $vhost(keys %$vhosts) {
+          $self->addVhostProcess($domain_info->{"ispmanReplicaMaster"}, $vhost, "ModifyVirtualHost", $vhost);
+       }
+       
     } else {
        # Delete directories for this domain
***************
*** 433,437 ****
     # Remove this domain from RelayDomains
     $self->addDomainSMTPProcess($domain, "RemoveRelayDomainEntry");
!    #Remove from destination 
     $self->addDomainSMTPProcess($domain, "RemoveDestinationDomainEntry");
  
--- 440,444 ----
     # Remove this domain from RelayDomains
     $self->addDomainSMTPProcess($domain, "RemoveRelayDomainEntry");
!    # Remove from destination 
     $self->addDomainSMTPProcess($domain, "RemoveDestinationDomainEntry");
  
***************
*** 558,562 ****
        }
  
!    } else {
        $data->{'ispmanReplicaMaster'}=$r->param("ispmanReplicaMaster");
        $data->{'ispmanDomainComment'}=$r->param("ispmanDomainComment");
--- 565,569 ----
        }
  
!    } else { # Replica
        $data->{'ispmanReplicaMaster'}=$r->param("ispmanReplicaMaster");
        $data->{'ispmanDomainComment'}=$r->param("ispmanDomainComment");
***************
*** 573,579 ****
--- 580,600 ----
        $self->addDomainSMTPProcess($domain, "modifyTransport");
        if ($ispmanDomainType eq "replica") {
+          # ispmanReplicaMaster changed?
           if ($domain_info->{'ispmanReplicaMaster'} ne $r->param("ispmanReplicaMaster") ) {
              $self->addDomainSMTPProcess($domain, "AddCanonicalMapEntry", $r->param("ispmanReplicaMaster"));
              $self->addDomainDNSProcess($domain, "modifyDomain");
+ 
+             # Update ServerAliases for vhosts of old MasterDomain
+             my $vhosts=$self->getApacheVhosts($domain_info->{"ispmanReplicaMaster"});
+             for my $vhost(keys %$vhosts) {
+                $self->addVhostProcess($domain_info->{"ispmanReplicaMaster"}, $vhost, "ModifyVirtualHost", $vhost);
+             }
+ 
+             # Update ServerAliases for vhosts of new MasterDomain
+             $vhosts=$self->getApacheVhosts($r->param("ispmanReplicaMaster"));
+             for my $vhost(keys %$vhosts) {
+                $self->addVhostProcess($r->param("ispmanReplicaMaster"), $vhost, "ModifyVirtualHost", $vhost);
+             }
+ 
           }
        }



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
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.