Code

Replaced array_merge with array operator +
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Aug 2007 08:55:35 +0000 (08:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 9 Aug 2007 08:55:35 +0000 (08:55 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7019 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_dhcpPlugin.inc
plugins/admin/systems/class_dhcpGroup.inc
plugins/admin/systems/class_dhcpHost.inc
plugins/admin/systems/class_dhcpPool.inc
plugins/admin/systems/class_dhcpService.inc
plugins/admin/systems/class_dhcpSharedNetwork.inc
plugins/admin/systems/class_dhcpSubnet.inc

index 93c5b507a6dcd76725beb4d01abad8c649d161cc..0aeaa6226464be11f85a620fdefcddfb7ad3b662 100644 (file)
@@ -114,8 +114,7 @@ class dhcpPlugin extends plugin
 
     /* Merge arrays for advanced view */
     foreach (array("options", "statements") as $type){
-      $tmp= array_merge($this->$type, $this->network->$type);
-      $this->advanced->$type= $tmp;
+      $this->advanced->$type= $this->$type + $this->network->$type;;
     }
   }
 
@@ -134,8 +133,7 @@ class dhcpPlugin extends plugin
   {
     /* Merge arrays for network and advanced view */
     foreach (array("options", "statements") as $type){
-      $tmp= array_merge($this->$type, $this->network->$type, $this->advanced->$type);
-      $this->$type= $tmp;
+      $this->$type= $this->$type + $this->network->$type + $this->advanced->$type;
     }
 
     /* Add cn if we're new */
index 7a412665c015cb5148751fc106d62013c17695a5..38c8421970ff27fe6e39c0a06ea30f8b6355d073 100644 (file)
@@ -39,8 +39,7 @@ class dhcpGroup extends dhcpPlugin
 
     /* Merge arrays for advanced view */
     foreach (array("options", "statements") as $type){
-      $tmp= array_merge($this->$type, $this->network->$type);
-      $this->advanced->$type= $tmp;
+      $this->advanced->$type= $this->$type + $this->network->$type;
     }
 
     $display.= $this->advanced->execute();
index 41d58424d556f4ab8541a7faf4e6e121f6dafc6b..2adb6990af72c075d5070e60b708413f9133747b 100644 (file)
@@ -63,8 +63,7 @@ class dhcpHost extends dhcpPlugin
 
     /* Merge arrays for advanced view */
     foreach (array("options", "statements") as $type){
-      $tmp= array_merge($this->$type, $this->network->$type);
-      $this->advanced->$type= $tmp;
+      $this->advanced->$type= $this->$type + $this->network->$type;
     }
 
     $display.= $this->advanced->execute();
index 5677322ff5a1bda24a1d84f297473661ac6797eb..26e9c39b89cae1676383a04bb9accb1280ca27bd 100644 (file)
@@ -54,8 +54,7 @@ class dhcpPool extends dhcpPlugin
 
     /* Merge arrays for advanced view */
     foreach (array("options", "statements") as $type){
-      $tmp= array_merge($this->$type, $this->network->$type);
-      $this->advanced->$type= $tmp;
+      $this->advanced->$type= $this->$type + $this->network->$type;;
     }
 
     $display.= $this->advanced->execute();
index 3e0954d1b552cef7d79e03aa0f7a210bb2d678b0..c4a0a7e2cd391ce6296735cbe067b3500c1a8426 100644 (file)
@@ -78,13 +78,7 @@ class dhcpService extends dhcpPlugin
 
     /* Merge arrays for advanced view */
     foreach (array("options", "statements") as $type){
-
-      $tmp = $this->$type;
-      foreach($this->network->$type as $name => $value){
-        $tmp[$name] = $value;
-      }        
-
-      $this->advanced->$type= $tmp;
+      $this->advanced->$type= $this->$type + $this->network->$type;;
     }
 
     $display.= $this->advanced->execute();
index 27c79849d0c31f8cb3ddd5828480d2c1250a48d9..0f9e54e9e39dc7eb3b0491b0f7b6bba3fea65cc1 100644 (file)
@@ -72,8 +72,7 @@ class dhcpSharedNetwork extends dhcpPlugin
 
     /* Merge arrays for advanced view */
     foreach (array("options", "statements") as $type){
-      $tmp= array_merge($this->$type, $this->network->$type);
-      $this->advanced->$type= $tmp;
+      $this->advanced->$type= $this->$type + $this->network->$type;
     }
 
     $display.= $this->advanced->execute();
index 098b01ee2942e3c079bd05fc8d6de2d68b9bbeda..afb12f0381d233e2599b5cbb4edc3d96b3007903 100644 (file)
@@ -73,8 +73,7 @@ class dhcpSubnet extends dhcpPlugin
 
     /* Merge arrays for advanced view */
     foreach (array("options", "statements") as $type){
-      $tmp= array_merge($this->$type, $this->network->$type);
-      $this->advanced->$type= $tmp;
+      $this->advanced->$type= $this->$type + $this->network->$type;
     }
 
     $display.= $this->advanced->execute();