From 4a29650485aae3300d193312d50ff92d05cac226 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 26 Feb 2010 15:23:52 +0000 Subject: [PATCH] Do not render path menu if empty git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15762 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_pluglist.inc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) 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 "; -- 2.30.2