Code

Updated config registry
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 May 2010 14:34:19 +0000 (14:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 12 May 2010 14:34:19 +0000 (14:34 +0000)
-It inclues property values from the menu section too

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18391 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_configRegistry.inc

index a780689f4086ca331c66b46e26a810be6dbc6d61..9936b023f294b9e88ef98cf52e753537ecb353ef 100644 (file)
@@ -50,6 +50,20 @@ 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){
+                if(count($entry) > 2 && isset($entry['CLASS'])){
+                    $class = $entry['CLASS'];
+                    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;
@@ -412,9 +426,9 @@ class gosaProperty
         }
 
         // Second check for values in the config file.
-        if(isset($this->parent->fileStoredProperties[$this->class][strtolower($this->name)])){
+        if(isset($this->parent->fileStoredProperties[strtolower($this->class)][strtolower($this->name)])){
             $this->setStatus('file');
-            $this->value = $this->parent->fileStoredProperties[$this->class][strtolower($this->name)];
+            $this->value = $this->parent->fileStoredProperties[strtolower($this->class)][strtolower($this->name)];
             return;
         }