From 928e5d63d17e08ba4b364838c75509d454d4fa74 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 May 2010 15:56:04 +0000 Subject: [PATCH] Updated property viewer git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18052 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_configRegistry.inc | 6 ++++-- .../addons/configViewer/class_configViewer.inc | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_configRegistry.inc b/gosa-core/include/class_configRegistry.inc index 3e9cb3b27..564978d0d 100644 --- a/gosa-core/include/class_configRegistry.inc +++ b/gosa-core/include/class_configRegistry.inc @@ -230,8 +230,10 @@ class gosaProperty function setValue($str) { - $this->setStatus('modified'); - $this->value = $str; + if($this->value != $str){ + $this->setStatus('modified'); + $this->value = $str; + } } function restoreDefault() diff --git a/gosa-core/plugins/addons/configViewer/class_configViewer.inc b/gosa-core/plugins/addons/configViewer/class_configViewer.inc index fea8e2e8d..687da8877 100644 --- a/gosa-core/plugins/addons/configViewer/class_configViewer.inc +++ b/gosa-core/plugins/addons/configViewer/class_configViewer.inc @@ -34,6 +34,24 @@ class configViewer extends management $this->registerAction("cancelProperties","cancelProperties"); } + /*! \brief Execute this plugin + * Handle actions/events, locking, snapshots, dialogs, tabs,... + */ + function execute() + { + foreach($_POST as $pName => $value){ + if(preg_match("/:/", $pName)){ + list($class,$name) = preg_split("/:/", $pName,2); + if($this->config->configRegistry->propertyExists($class,$name)){ + $prop = $this->config->configRegistry->getProperty($class,$name); + $prop->setValue(get_post($pName));; + } + } + } + return(management::execute()); + } + + function cancelProperties() { $this->config->configRegistry->reload($force=TRUE); -- 2.30.2