Code

Updated server service copy & paste
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Jun 2007 13:46:33 +0000 (13:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Jun 2007 13:46:33 +0000 (13:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6595 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_goMailServer.inc
plugins/admin/systems/class_goNtpServer.inc
plugins/admin/systems/class_servGeneric.inc
plugins/admin/systems/class_serverService.inc

index 251d2e53b15370400d50ac8a315f797eddb69e7e..2d1f08c500a2394cd91723945f4423f00b35ef8d 100644 (file)
@@ -685,6 +685,16 @@ class goMailServer extends goService{
   }
 
 
+  function PrepareForCopyPaste($source)
+  {
+    plugin::PrepareForCopyPaste($source);
+
+    $source_o = new goMailServer($this->config,$source['dn']);
+    foreach(array("postfixMyNetworks","postfixTransportTable","postfixSenderRestrictions","postfixRecipientRestrictions","postfixMyDestinations") as $attr){
+      $this->$attr = $source_o->$attr;
+    }
+  }
+
 
   /* Return plugin informations for acl handling */
   function plInfo()
index bba487bc32719ff45dc1b3bc32d6846815f9dcbe..aeb5a4b974f2b8a569f7128da21e8a7c7f838992 100644 (file)
@@ -124,6 +124,22 @@ class goNtpServer extends goService{
           ));
   }
 
+  
+  function PrepareForCopyPaste($source)
+  {
+    plugin::PrepareForCopyPaste($source);
+
+    /* Load arrays */
+    $tmp = array();
+    if (isset($source['goTimeSource'])){
+      for ($i= 0; $i<$source['goTimeSource']['count']; $i++){
+        $tmp[$source['goTimeSource'][$i]]= $source['goTimeSource'][$i];
+      }
+    }
+    $this->goTimeSource= $tmp;
+
+
+  }
 
   function check(){ return array();}
 
index ee00a7a349606932810c1f4c5699773bc6cb66f0..24c3f9a9cccf9e06a7d8b09cd5886566c7512756 100644 (file)
@@ -400,7 +400,7 @@ class servgeneric extends plugin
       $this->netConfigDNS->macAddress = $source['macAddress'][0];
     }
     if(isset($source['ipHostNumber'][0])){
-      $this->netConfigDNS->macAddress = $source['ipHostNumber'][0];
+      $this->netConfigDNS->ipHostNumber = $source['ipHostNumber'][0];
     }
 
   }
index a4c4921d61459b2da3619de3d29f374ba6111b6e..65da3963fa78dc231d1403da2e270e7e15815628 100644 (file)
@@ -411,6 +411,16 @@ class ServerService extends plugin
     }
   }
 
+  
+  function PrepareForCopyPaste($source)
+  {
+    plugin::PrepareForCopyPaste($source);
+
+    foreach($this->plugins as $name => $plugin){
+      $this->plugins[$name]->PrepareForCopyPaste($source);
+    }
+  }
+
 
   /* Check if all plugins allow a remove ..  */
   function allow_remove()