From: hickert Date: Tue, 4 May 2010 16:14:08 +0000 (+0000) Subject: Fixed order of post reaction and saving X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=dc941227929c0c9e3822718d1687e269f4a55034;p=gosa.git Fixed order of post reaction and saving git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18056 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/addons/configViewer/class_configViewer.inc b/gosa-core/plugins/addons/configViewer/class_configViewer.inc index aa6003def..78f66573b 100644 --- a/gosa-core/plugins/addons/configViewer/class_configViewer.inc +++ b/gosa-core/plugins/addons/configViewer/class_configViewer.inc @@ -34,21 +34,27 @@ class configViewer extends management $this->registerAction("cancelProperties","cancelProperties"); } - /*! \brief Execute this plugin - * Handle actions/events, locking, snapshots, dialogs, tabs,... - */ - function renderList() + + function execute() { // Walk trough all properties and check if there posts for us. $all = $this->config->configRegistry->getAllProperties(); - $modified = FALSE; foreach($all as $prop){ $post = "{$prop->getClass()}:{$prop->getName()}"; - if(isset($_POST[$post])){ - $prop->setValue(get_post($post));; + if(isset($_POST[$post]) && !in_array($prop->getStatus(),array('removed'))){ + $prop->setValue(get_post($post)); } - - $modified |= in_array($prop->getStatus(),array('modified','removed')); + } + return(management::execute()); + } + + function renderList() + { + // Walk trough all properties and check if there posts for us. + $all = $this->config->configRegistry->getAllProperties(); + foreach($all as $prop){ + $modified = in_array($prop->getStatus(),array('modified','removed')); + if($modified) break; } $smarty = get_smarty();