From: hickert Date: Wed, 8 Sep 2010 14:17:18 +0000 (+0000) Subject: Updated config registry to include properties defined in the pathmenu section of... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3cf27072b11e6ad68845809963ae79ff24c4bc58;p=gosa.git Updated config registry to include properties defined in the pathmenu section of the gosa.conf git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19566 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index f895a3dac..f971d10a5 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -344,7 +344,6 @@ class configRegistry{ } } - // Search for config flags defined in the config file (MENU section) foreach($this->config->data['MENU'] as $section => $entries){ foreach($entries as $entry){ @@ -365,6 +364,25 @@ class configRegistry{ } } + // Search for config flags defined in the config file (PATHMENU) + foreach($this->config->data['PATHMENU'] as $entry){ + + if(isset($entry['CLASS'])){ + + // Put plugin to active plugins list. + $class = strtolower($entry['CLASS']); + $this->activePlugins[$class] = $class; + + if(count($entry) > 2 ){ + foreach($entry as $name => $value){ + if(!in_array($name, array('CLASS','ACL'))){ + $this->fileStoredProperties[strtolower($class)][strtolower($name)] = $value; + } + } + } + } + } + // Search for config flags defined in the config file (MAIN section) foreach($this->config->data['MAIN'] as $name => $value){ $this->fileStoredProperties['core'][strtolower($name)] = $value; diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index e1a7853b9..de01808be 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -1589,7 +1589,9 @@ class plugin global $config; $command = $config->configRegistry->getPropertyValue(get_class($plugin),$cmd); - if ($command != ""){ + if (empty($command)){ + $returnCode = 0; // Simulate a return code to tell the caller that everythin is fine. + }else{ // Walk trough attributes list and add the plugins attributes. foreach ($plugin->attributes as $attr){