From 477faf69ed070fa51b825a8a4b33ffd18c4b8b30 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 14 May 2010 12:37:59 +0000 Subject: [PATCH] Fixed property removal git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18475 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_configRegistry.inc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index d2c71a594..f5b51d861 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -418,7 +418,6 @@ class gosaProperty private function _restoreCurrentValue() { - // First check for values in the LDAP Database. if(isset($this->parent->ldapStoredProperties[$this->class][$this->name])){ $this->setStatus('ldap'); @@ -463,7 +462,7 @@ class gosaProperty function getValue($temporary = FALSE) { - if($temporary && in_array($this->getStatus(), array('modified'))){ + if($temporary && in_array($this->getStatus(), array('modified','removed'))){ return($this->tmp_value); }else{ return($this->value); @@ -474,8 +473,13 @@ class gosaProperty { if(in_array($this->getStatus(),array('ldap'))){ $this->setStatus('removed'); - }elseif(in_array($this->getStatus(),array('modified'))){ - $this->_restoreCurrentValue(); + + // Second check for values in the config file. + if(isset($this->parent->fileStoredProperties[strtolower($this->class)][strtolower($this->name)])){ + $this->tmp_value = $this->parent->fileStoredProperties[strtolower($this->class)][strtolower($this->name)]; + }else{ + $this->tmp_value = $this->getDefault(); + } } } -- 2.30.2