From: hickert Date: Fri, 26 Feb 2010 15:23:52 +0000 (+0000) Subject: Do not render path menu if empty X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4a29650485aae3300d193312d50ff92d05cac226;p=gosa.git Do not render path menu if empty git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15762 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index e4602283a..f52b9fda7 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -293,18 +293,20 @@ class pluglist { "\n ". "\n
  • Welcome to GOsa
  • "; - $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
  • {$title}
  • "; } - - list($index, $title, $desc, $icon) = $this->getPlugData($plug['CLASS']); - $this->pathMenu.= "\n
  • {$title}
  • "; } $this->pathMenu.= "\n "; $this->pathMenu.= "\n ";