Code

Do not render path menu if empty
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Feb 2010 15:23:52 +0000 (15:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Feb 2010 15:23:52 +0000 (15:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15762 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_pluglist.inc

index e4602283a8db3205f7f97ca20ee3c4fc43d4e9ad..f52b9fda7316e99c39f663deb87d4a15a0831dc2 100644 (file)
@@ -293,18 +293,20 @@ class pluglist {
         "\n      </li>".
         "\n      <li class='left'>Welcome to GOsa</li>";
 
-      $cfg= &$this->config->data['PATHMENU'];
-      $rcfg = array_reverse($cfg);
-      foreach($rcfg as $id => $plug){
+      if(isset($this->config->data['PATHMENU'])){
+        $cfg= &$this->config->data['PATHMENU'];
+        $rcfg = array_reverse($cfg);
+        foreach($rcfg as $id => $plug){
+
+          // Do not add inaccessible plugins
+          if (!$this->check_access($plug['ACL'])){
+            unset($rcfg[$id]);
+            continue; 
+          }
 
-        // Do not add inaccessible plugins
-        if (!$this->check_access($plug['ACL'])){
-          unset($rcfg[$id]);
-          continue; 
+          list($index, $title, $desc, $icon) = $this->getPlugData($plug['CLASS']);
+          $this->pathMenu.= "\n     <li class='right left-border'>{$title}</li>";
         }
-
-        list($index, $title, $desc, $icon) = $this->getPlugData($plug['CLASS']);
-        $this->pathMenu.= "\n     <li class='right left-border'>{$title}</li>";
       }
       $this->pathMenu.= "\n    </ul>";
       $this->pathMenu.= "\n    </div>";