From b4131d101da1f42222fe9c357c58f66aae7c4160 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 19 May 2010 08:38:20 +0000 Subject: [PATCH] Updated property editor. -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 | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index 192330579..ec1096687 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -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); + } } } -- 2.30.2