Code

Fixed order of post reaction and saving
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 May 2010 16:14:08 +0000 (16:14 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 May 2010 16:14:08 +0000 (16:14 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18056 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/addons/configViewer/class_configViewer.inc

index aa6003def684786611caa8a6422a49996a0cfe54..78f66573ba71febc6bc010c32fefc48b15dc9be2 100644 (file)
@@ -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();