From: cajus Date: Mon, 10 Sep 2007 13:23:18 +0000 (+0000) Subject: Fixed adding of DHCP servers X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e953900ecbd78135bd845ba675610c74c625b7b4;p=gosa.git Fixed adding of DHCP servers git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7240 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_dhcpPlugin.inc b/include/class_dhcpPlugin.inc index b9d48b25f..a28e3958a 100644 --- a/include/class_dhcpPlugin.inc +++ b/include/class_dhcpPlugin.inc @@ -195,6 +195,14 @@ class dhcpPlugin extends plugin $this->removeAttrs($name, 'dhcpStatement'); } + + function fix_options() + { + foreach (array('domain-name-servers') as $key){ + unset ($this->options[$key]); + } + } + } ?> diff --git a/plugins/admin/systems/class_dhcpAdvanced.inc b/plugins/admin/systems/class_dhcpAdvanced.inc index 74094f73c..4e2cae5da 100644 --- a/plugins/admin/systems/class_dhcpAdvanced.inc +++ b/plugins/admin/systems/class_dhcpAdvanced.inc @@ -130,7 +130,7 @@ class dhcpAdvanced extends plugin function setAutoOptions($addopt= array()) { - $options= array("routers", "domain-name", "subnet-mask", "broadcast-address"); + $options= array("routers", "domain-name", "domain-name-servers", "subnet-mask", "broadcast-address"); $this->autoOptions= array_merge($options, $addopt); } diff --git a/plugins/admin/systems/class_dhcpGroup.inc b/plugins/admin/systems/class_dhcpGroup.inc index 47369286e..eb61c4822 100644 --- a/plugins/admin/systems/class_dhcpGroup.inc +++ b/plugins/admin/systems/class_dhcpGroup.inc @@ -38,6 +38,7 @@ class dhcpGroup extends dhcpPlugin $display= $smarty->fetch (get_template_path('dhcp_group.tpl', TRUE)).$this->network->execute(); /* Merge arrays for advanced view */ + $this->fix_options(); foreach (array("options", "statements") as $type){ $this->advanced->$type= $this->$type + $this->network->$type; } diff --git a/plugins/admin/systems/class_dhcpHost.inc b/plugins/admin/systems/class_dhcpHost.inc index c6ce4dacf..13d002428 100644 --- a/plugins/admin/systems/class_dhcpHost.inc +++ b/plugins/admin/systems/class_dhcpHost.inc @@ -66,10 +66,10 @@ class dhcpHost extends dhcpPlugin $display= $smarty->fetch(get_template_path('dhcp_host.tpl', TRUE)).$this->network->execute(); /* Merge arrays for advanced view */ + $this->fix_options(); foreach (array("options", "statements") as $type){ $this->advanced->$type= $this->$type + $this->network->$type; } - $display.= $this->advanced->execute(); /* Merge back for removals */ diff --git a/plugins/admin/systems/class_dhcpNetwork.inc b/plugins/admin/systems/class_dhcpNetwork.inc index a8c751a72..fc73234e4 100644 --- a/plugins/admin/systems/class_dhcpNetwork.inc +++ b/plugins/admin/systems/class_dhcpNetwork.inc @@ -48,6 +48,7 @@ class dhcpNetwork extends plugin } } $servers[get_post('addserver')]= get_post('addserver'); + $tmp= ""; foreach($servers as $val){ $tmp.= $val.","; diff --git a/plugins/admin/systems/class_dhcpPool.inc b/plugins/admin/systems/class_dhcpPool.inc index d001c0663..57330fe33 100644 --- a/plugins/admin/systems/class_dhcpPool.inc +++ b/plugins/admin/systems/class_dhcpPool.inc @@ -53,6 +53,7 @@ class dhcpPool extends dhcpPlugin $display= $smarty->fetch(get_template_path('dhcp_pool.tpl', TRUE)).$this->network->execute(); /* Merge arrays for advanced view */ + $this->fix_options(); foreach (array("options", "statements") as $type){ $this->advanced->$type= $this->$type + $this->network->$type;; } diff --git a/plugins/admin/systems/class_dhcpService.inc b/plugins/admin/systems/class_dhcpService.inc index 477accb7e..b3d7e0b0b 100644 --- a/plugins/admin/systems/class_dhcpService.inc +++ b/plugins/admin/systems/class_dhcpService.inc @@ -77,6 +77,7 @@ class dhcpService extends dhcpPlugin $display= $smarty->fetch(get_template_path('dhcp_service.tpl', TRUE)).$this->network->execute(); /* Merge arrays for advanced view */ + $this->fix_options(); foreach (array("options", "statements") as $type){ $this->advanced->$type= $this->$type + $this->network->$type;; } diff --git a/plugins/admin/systems/class_dhcpSharedNetwork.inc b/plugins/admin/systems/class_dhcpSharedNetwork.inc index 9e1f7e43b..ae4f0db62 100644 --- a/plugins/admin/systems/class_dhcpSharedNetwork.inc +++ b/plugins/admin/systems/class_dhcpSharedNetwork.inc @@ -71,6 +71,7 @@ class dhcpSharedNetwork extends dhcpPlugin $display= $smarty->fetch(get_template_path('dhcp_sharedNetwork.tpl', TRUE)).$this->network->execute(); /* Merge arrays for advanced view */ + $this->fix_options(); foreach (array("options", "statements") as $type){ $this->advanced->$type= $this->$type + $this->network->$type; } diff --git a/plugins/admin/systems/class_dhcpSubnet.inc b/plugins/admin/systems/class_dhcpSubnet.inc index ce1c4c164..82fbad904 100644 --- a/plugins/admin/systems/class_dhcpSubnet.inc +++ b/plugins/admin/systems/class_dhcpSubnet.inc @@ -72,6 +72,7 @@ class dhcpSubnet extends dhcpPlugin $display= $smarty->fetch(get_template_path('dhcp_subnet.tpl', TRUE)).$this->network->execute(); /* Merge arrays for advanced view */ + $this->fix_options(); foreach (array("options", "statements") as $type){ $this->advanced->$type= $this->$type + $this->network->$type; } diff --git a/plugins/personal/posix/posix_groups.tpl b/plugins/personal/posix/posix_groups.tpl index 3a487274e..841d8a87a 100644 --- a/plugins/personal/posix/posix_groups.tpl +++ b/plugins/personal/posix/posix_groups.tpl @@ -39,15 +39,6 @@ - - - -
- - {t}Search in subtrees{/t} -
-
 {t}Display groups matching{/t} @@ -69,6 +60,15 @@
+ + + + +
+ + {t}Search in subtrees{/t} +
{$apply}