Code

Fixed URL extraction
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Feb 2008 17:05:06 +0000 (17:05 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 26 Feb 2008 17:05:06 +0000 (17:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9134 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/modules/SIPackages.pm

index d85d0b05d849645fd454b0ba3cad6cda93c9e12a..50efa409ccf4dc5a3330c11cab97751c81e83056 100644 (file)
@@ -752,17 +752,17 @@ sub new_ldap_config {
        @servers= sort (@servers);
 
        foreach $server (@servers){
-               # Conversation for backward compatibility
-               if (not $server =~ /^ldap[^:]+:\/\// ) {
-                   if ($server =~ /^([^:]+):(.*)$/ ) {
-                $server= "1:dummy:ldap://$1/$2";
-                   }
-               }
+                # Conversation for backward compatibility
+                if (not $server =~ /^\d+:[^:]+:ldap[^:]*:\/\// ) {
+                    if ($server =~ /^([^:]+):(.*)$/ ) {
+                      $server= "1:dummy:ldap://$1/$2";
+                    }
+                }
 
-               $base= $server;
-               $server =~ s%^[^:]+:[^:]+:(ldap.*://[^/]+)/.*$%$1%;
-               $base =~ s%^[^:]+:[^:]+:ldap.*://[^/]+/(.*)$%$1%;
-               push (@ldap_uris, $server);
+                $base= $server;
+                $server =~ s%^[^:]+:[^:]+:(ldap.*://[^/]+)/.*$%$1%;
+                $base =~ s%^[^:]+:[^:]+:ldap.*://[^/]+/(.*)$%$1%;
+                push (@ldap_uris, $server);
        }
 
        # Assemble data package