Code

Updated property viewer
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 May 2010 15:56:04 +0000 (15:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 May 2010 15:56:04 +0000 (15:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18052 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 3e9cb3b275bbc7873ac2148d4252c1c5eb3634c0..564978d0d478b4729b8c2bc6d4cd5499c8cbf71d 100644 (file)
@@ -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() 
index fea8e2e8d18e439cce344b1a49d94bd4a83b6c31..687da8877719b1dfb7fca2ac5fa3b977b3356b68 100644 (file)
@@ -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);