Code

Be not that picky with uri inspection. Closes #15589
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Feb 2010 13:51:35 +0000 (13:51 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 5 Feb 2010 13:51:35 +0000 (13:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15595 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_config.inc

index 8a87aa3f97313889b5cb5f8b6d43938fc9807431..dd922df9649b76bde51fab9c5bec92e232ce33ec 100644 (file)
@@ -391,8 +391,8 @@ class config  {
       $bases= array();
       $servers= array();
       foreach ($this->current['REFERRAL'] as $ref){
-        $server= preg_replace('%^(.*)/[^/]+$%', '\\1', $ref['URI']);
-        $base= preg_replace('%^.*/([^/]+)$%', '\\1', $ref['URI']);
+        $server= preg_replace('%^(.*://[^/]+)/.*$%', '\\1', $ref['URI']);
+        $base= preg_replace('%^.*://[^/]+/(.*)$%', '\\1', $ref['URI']);
         $bases[$base]= strlen($base);
         $servers[$base]= $server;
       }