Code

Updated property editor.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 May 2010 08:38:20 +0000 (08:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 19 May 2010 08:38:20 +0000 (08:38 +0000)
-We got propblems removing setting while ignoreLdapProperties was true.

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

gosa-core/include/class_configRegistry.inc

index 192330579c8915469f48a813078f0749ae9b72fb..ec10966878c2ed6fac6cfd604398cc0c1c64fdbd 100644 (file)
@@ -87,7 +87,7 @@ class configRegistry{
         }
 
         // Search for all config flags defined in the LDAP - BUT only if we ARE logged in. 
-        if(!$this->ignoreLdapProperties && !empty($this->config->current['CONFIG'])){
+        if(!empty($this->config->current['CONFIG'])){
             $ldap = $this->config->get_ldap_link();
             $ldap->cd($this->config->current['CONFIG']);
             $ldap->search('(&(objectClass=gosaConfig)(gosaSetting=*))', array('cn','gosaSetting'));
@@ -472,10 +472,24 @@ class gosaProperty
 
     function getValue($temporary = FALSE) 
     { 
-        if($temporary && in_array($this->getStatus(), array('modified','removed'))){
-            return($this->tmp_value); 
+        if($temporary){
+            if(in_array($this->getStatus(), array('modified','removed'))){
+                return($this->tmp_value); 
+            }else{
+                return($this->value); 
+            }
         }else{ 
-            return($this->value); 
+
+            // Do not return ldap values if we've to ignore them.
+            if($this->parent->ignoreLdapProperties){
+                if(isset($this->parent->fileStoredProperties[strtolower($this->class)][strtolower($this->name)])){
+                    return($this->parent->fileStoredProperties[strtolower($this->class)][strtolower($this->name)]);
+                }else{
+                    return($this->getDefault());
+                }
+            }else{
+                return($this->value); 
+            }
         }
     }