Code

Updated post event handling
[gosa.git] / gosa-core / include / class_config.inc
index 8a87aa3f97313889b5cb5f8b6d43938fc9807431..64995adaccc80e487f2f38ca4820d03437a501b2 100644 (file)
@@ -247,6 +247,10 @@ class config  {
                   }
                   break;
 
+      case 'PATHMENU':
+                  $this->data['PATHMENU']= array(); ;
+                  break;
+
                   /* Inser plugins */
       case 'PLUGIN':
                   if ($this->tags[$this->level-3] == 'MENU' &&
@@ -254,6 +258,9 @@ class config  {
 
                     $this->data['MENU'][$this->section][$this->gpc++]= $attrs;
                   }
+                  if ($this->tags[$this->level-2] == 'PATHMENU'){
+                    $this->data['PATHMENU'][$this->gpc++]= $attrs;
+                  }
                   if ($this->tags[$this->level-2] == 'SERVICEMENU'){
                     $this->data['SERVICE'][$attrs['CLASS']]= $attrs;
                   }
@@ -391,8 +398,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;
       }