Code

Updated property registry
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 May 2010 09:34:55 +0000 (09:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 5 May 2010 09:34:55 +0000 (09:34 +0000)
-UPPER and lowercase given properties will now be found again.

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

gosa-core/include/class_configRegistry.inc

index e0e09f94fcf5ee4f77248d840f9a9fe41426553a..22d84c49bf17ec1c87c5462ad288352857c86179 100644 (file)
@@ -116,7 +116,7 @@ class configRegistry{
     {
         $id = count($this->properties);
         $this->properties[$id] = new gosaProperty($this,$class,$data);
-        $this->mapByName[$class][$data['name']] = $id;
+        $this->mapByName[$class][strtolower($data['name'])] = $id;
         $this->mapByClass[$class][] = $id;
         $this->mapPropertyToClass[$id] = $class;
     }
@@ -128,16 +128,15 @@ class configRegistry{
 
     function propertyExists($class,$name)
     {
-        if(!isset($this->mapByName[$class][$name])){
-        print_a(array($class,$name));
-
-        }
-        return(isset($this->mapByName[$class][$name]));
+        return(isset($this->mapByName[$class][strtolower($name)]));
     }
 
     private function getId($class,$name)
     {
-        return($this->mapByName[$class][$name]);    
+        if(!isset($this->mapByName[$class][strtolower($name)])){
+            return(-1);
+        }       
+        return($this->mapByName[$class][strtolower($name)]);    
     }
 
     function getProperty($class,$name)