From 61f87e2899af9519d66537dde65ca8b2cd516f76 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 9 Aug 2007 08:55:35 +0000 Subject: [PATCH] Replaced array_merge with array operator + git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7019 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_dhcpPlugin.inc | 6 ++---- plugins/admin/systems/class_dhcpGroup.inc | 3 +-- plugins/admin/systems/class_dhcpHost.inc | 3 +-- plugins/admin/systems/class_dhcpPool.inc | 3 +-- plugins/admin/systems/class_dhcpService.inc | 8 +------- plugins/admin/systems/class_dhcpSharedNetwork.inc | 3 +-- plugins/admin/systems/class_dhcpSubnet.inc | 3 +-- 7 files changed, 8 insertions(+), 21 deletions(-) diff --git a/include/class_dhcpPlugin.inc b/include/class_dhcpPlugin.inc index 93c5b507a..0aeaa6226 100644 --- a/include/class_dhcpPlugin.inc +++ b/include/class_dhcpPlugin.inc @@ -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 */ diff --git a/plugins/admin/systems/class_dhcpGroup.inc b/plugins/admin/systems/class_dhcpGroup.inc index 7a412665c..38c842197 100644 --- a/plugins/admin/systems/class_dhcpGroup.inc +++ b/plugins/admin/systems/class_dhcpGroup.inc @@ -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(); diff --git a/plugins/admin/systems/class_dhcpHost.inc b/plugins/admin/systems/class_dhcpHost.inc index 41d58424d..2adb6990a 100644 --- a/plugins/admin/systems/class_dhcpHost.inc +++ b/plugins/admin/systems/class_dhcpHost.inc @@ -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(); diff --git a/plugins/admin/systems/class_dhcpPool.inc b/plugins/admin/systems/class_dhcpPool.inc index 5677322ff..26e9c39b8 100644 --- a/plugins/admin/systems/class_dhcpPool.inc +++ b/plugins/admin/systems/class_dhcpPool.inc @@ -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(); diff --git a/plugins/admin/systems/class_dhcpService.inc b/plugins/admin/systems/class_dhcpService.inc index 3e0954d1b..c4a0a7e2c 100644 --- a/plugins/admin/systems/class_dhcpService.inc +++ b/plugins/admin/systems/class_dhcpService.inc @@ -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(); diff --git a/plugins/admin/systems/class_dhcpSharedNetwork.inc b/plugins/admin/systems/class_dhcpSharedNetwork.inc index 27c79849d..0f9e54e9e 100644 --- a/plugins/admin/systems/class_dhcpSharedNetwork.inc +++ b/plugins/admin/systems/class_dhcpSharedNetwork.inc @@ -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(); diff --git a/plugins/admin/systems/class_dhcpSubnet.inc b/plugins/admin/systems/class_dhcpSubnet.inc index 098b01ee2..afb12f038 100644 --- a/plugins/admin/systems/class_dhcpSubnet.inc +++ b/plugins/admin/systems/class_dhcpSubnet.inc @@ -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(); -- 2.30.2