From e30690e2876795970ad4283fcb1ae9fe82f84c08 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 29 Jun 2010 13:35:25 +0000 Subject: [PATCH] Updated config and pluglist to supprt the new shortCut menu git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18866 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_config.inc | 7 ++++ gosa-core/include/class_pluglist.inc | 52 ++++++++++++++++++++++------ 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/gosa-core/include/class_config.inc b/gosa-core/include/class_config.inc index 7eb2d38b6..17b860c58 100644 --- a/gosa-core/include/class_config.inc +++ b/gosa-core/include/class_config.inc @@ -253,6 +253,10 @@ class config { $this->data['PATHMENU']= array(); ; break; + case 'SHORTCUTMENU': + $this->data['SHORTCUTMENU']= array(); ; + break; + /* Inser plugins */ case 'PLUGIN': if ($this->tags[$this->level-3] == 'MENU' && @@ -263,6 +267,9 @@ class config { if ($this->tags[$this->level-2] == 'PATHMENU'){ $this->data['PATHMENU'][$this->gpc++]= $attrs; } + if ($this->tags[$this->level-2] == 'SHORTCUTMENU'){ + $this->data['SHORTCUTMENU'][$this->gpc++]= $attrs; + } if ($this->tags[$this->level-2] == 'SERVICEMENU'){ $this->data['SERVICE'][$attrs['CLASS']]= $attrs; } diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index 1a537eb4d..f633d55f9 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -313,6 +313,16 @@ class pluglist $disabledPlugins = $this->config->configRegistry->getDisabledPlugins(); + // Now load the icon menu and try to register the plugins in the pluglist + // if this fails for some reason, then remove the plugins from the menu. + if(isset($this->config->data['SHORTCUTMENU'])){ + foreach($this->config->data['SHORTCUTMENU'] as $id => $plugin){ + if(!$this->registerPlugin($plugin)){ + unset($this->config->data['SHORTCUTMENU'][$id]); + } + } + } + // Now load the path menu and try to register the plugins in the pluglist // if this fails for some reason, then remove the plugin from the menu. if(isset($this->config->data['PATHMENU'])){ @@ -324,15 +334,28 @@ class pluglist } $this->pathMenu = - "\n
". - "\n