ispman/lib http.lib,1.53,1.54

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

Modified Files:
	http.lib 
Log Message:
changed ispmanVhostServerAlias code

Index: http.lib
===================================================================
RCS file: /cvsroot/ispman/ispman/lib/http.lib,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- http.lib	5 Jun 2004 12:45:22 -0000	1.53
+++ http.lib	6 Jun 2004 09:11:43 -0000	1.54
@@ -67,33 +67,25 @@
     # create list of vhost aliases
     my @_ispmanVhostServerAliases = ();
 
-    # Load old-style Vhost Aliases
-    if ( ref $vhostInfo->{'ispmanVhostServerAlias'} eq "ARRAY" ) {
-        for ( @{ $vhostInfo->{'ispmanVhostServerAlias'} } ) {
-            push @_ispmanVhostServerAliases, $_;
-        }
-    }
-    else {
-        push @_ispmanVhostServerAliases, $vhostInfo->{'ispmanVhostServerAlias'};
-    }
-
-    # New ispmanVhostServerAlias branches. The old code will go away in future.
     $ispmanVhostServerAliases = $ispman->getAliases( $domain, $vhost );
     for ( keys %$ispmanVhostServerAliases ) {
+        my $alias=$ispmanVhostServerAliases->{$_}{'ispmanVhostServerAlias'};
 
-        # Add the domain suffix to the alias.
-        # These aliases are not fully qualified names.
-        push @_ispmanVhostServerAliases, join '.',
-          ( $ispmanVhostServerAliases->{$_}{'ispmanVhostServerAlias'},
-            $domain );
+        # Add the domain suffix to the alias for unqualified names
+        if ($alias !~ /\./){
+            push @_ispmanVhostServerAliases, join '.', ( $alias, $domain );
 
-        # Add vhost aliases to all replica domains, too
-        for my $_replica ( keys %$domainReplicas ) {
-            push @_ispmanVhostServerAliases, join '.',
-              (
-                $ispmanVhostServerAliases->{$_}{'ispmanVhostServerAlias'},
-                $_replica
-              );
+            # Add vhost aliases to all replica domains, too
+            for my $_replica ( keys %$domainReplicas ) {
+                push @_ispmanVhostServerAliases, join '.',
+                (
+                 $ispmanVhostServerAliases->{$_}{'ispmanVhostServerAlias'},
+                 $_replica
+                 );
+            }
+        }
+        else {
+            push @_ispmanVhostServerAliases, $alias;
         }
     }
 



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
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.