Code

Added property class to get_cfg_requests
[gosa.git] / gosa-core / include / class_configRegistry.inc
index e0e09f94fcf5ee4f77248d840f9a9fe41426553a..0f623ee08366720af8f7c422d76a23d7750183fa 100644 (file)
@@ -4,8 +4,6 @@ class configRegistry{
 
     public $config = NULL;
     public $properties = array();
-    public $mapByClass = array();
-    public $mapPropertyToClass = array();
     public $ldapStoredProperties = array(); 
     public $fileStoredProperties = array(); 
     public $classToName = array(); 
@@ -30,9 +28,7 @@ class configRegistry{
         $this->ldapStoredProperties = array();
         $this->fileStoredProperties = array();
         $this->properties = array();
-        $this->mapByClass = array();
         $this->mapByName = array();
-        $this->mapPropertyToClass = array();
 
         // Search for config flags defined in the config file (TAB section)
         foreach($this->config->data['TABS'] as $tabname => $tabdefs){
@@ -116,9 +112,8 @@ class configRegistry{
     {
         $id = count($this->properties);
         $this->properties[$id] = new gosaProperty($this,$class,$data);
-        $this->mapByName[$class][$data['name']] = $id;
-        $this->mapByClass[$class][] = $id;
-        $this->mapPropertyToClass[$id] = $class;
+        $p = strtolower("{$class}::{$data['name']}");
+        $this->mapByName[$p] = $id;
     }
 
     public function getAllProperties()
@@ -127,17 +122,18 @@ class configRegistry{
     }
 
     function propertyExists($class,$name)
-    {
-        if(!isset($this->mapByName[$class][$name])){
-        print_a(array($class,$name));
-
-        }
-        return(isset($this->mapByName[$class][$name]));
+    {       
+        $p = strtolower("{$class}::{$name}");
+        return(isset($this->mapByName[$p]));
     }
 
     private function getId($class,$name)
     {
-        return($this->mapByName[$class][$name]);    
+        $p = strtolower("{$class}::{$name}");
+        if(!isset($this->mapByName[$p])){
+            return(-1);
+        }       
+        return($this->mapByName[$p]);    
     }
 
     function getProperty($class,$name)