Code

Added conflict with kolab
[gosa.git] / plugins / admin / systems / class_serverService.inc
index f88ea34861080dcc2ffa32cc64a4817829f9c54a..34b66573ed11e816a54f9bd020a90fdbc447cf78 100644 (file)
@@ -31,6 +31,7 @@ class ServerService extends plugin
   var $current          = "";
   var $backup           = NULL;
   var $acl              ;
+  var $cn;
 
   function ServerService ($config, $dn)
   {
@@ -149,7 +150,7 @@ class ServerService extends plugin
 
     /* Abort dialog */
     if(isset($_POST['SaveService'])){
-
+      $this->dialog->save_object();
       $msgs = $this->dialog->check();
       if(count($msgs)){
         foreach($msgs as $msg){
@@ -157,6 +158,10 @@ class ServerService extends plugin
         }
       }else{
         $this->plugins[$this->current] = $this->dialog;
+        $tmp  = get_object_vars($this->dialog);
+        foreach($tmp as $name => $value){
+          $this->plugins[$this->current]->$name = $value;
+        }
         $this->current = "";
         $this->dialog = NULL;
         $this->backup = NULL;
@@ -269,13 +274,24 @@ class ServerService extends plugin
       return;
     }
     
+    $caseVars = array("cn","dn");
     if($service == ALL_SERVICES){
       foreach($this->plugins as $name => $obj){
+        foreach($caseVars as $var){
+          if(isset($this->$var)){
+            $this->plugins[$name]->$var = $this->$var;  
+          }
+        }
         if($this->plugins[$name]->initially_was_account && $this->plugins[$name]->is_account){
           $this->plugins[$name]->setStatus($action);
         }
       }
     }else{
+      foreach($caseVars as $var){
+        if(isset($this->$var)){
+          $this->plugins[$service]->$var = $this->$var;  
+        }
+      }
       if($this->plugins[$service]->is_account){
         $this->plugins[$service]->setStatus($action);
       }