From e53feaf430f7858ec517741e86799b65d6fc2f28 Mon Sep 17 00:00:00 2001 From: cajus Date: Mon, 10 Sep 2007 13:32:27 +0000 Subject: [PATCH] Updated trunk with dns problem patch git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7241 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_cache_handler.inc | 4 ++-- include/class_dhcpPlugin.inc | 8 ++++++++ plugins/admin/systems/class_dhcpAdvanced.inc | 2 +- plugins/admin/systems/class_dhcpGroup.inc | 1 + plugins/admin/systems/class_dhcpHost.inc | 2 +- plugins/admin/systems/class_dhcpNetwork.inc | 1 + plugins/admin/systems/class_dhcpPool.inc | 1 + plugins/admin/systems/class_dhcpService.inc | 1 + .../admin/systems/class_dhcpSharedNetwork.inc | 1 + plugins/admin/systems/class_dhcpSubnet.inc | 1 + plugins/personal/posix/posix_groups.tpl | 18 +++++++++--------- 11 files changed, 27 insertions(+), 13 deletions(-) diff --git a/include/class_cache_handler.inc b/include/class_cache_handler.inc index 77b11f7e0..fd47ec861 100644 --- a/include/class_cache_handler.inc +++ b/include/class_cache_handler.inc @@ -4,7 +4,7 @@ class gosa_cache { var $c_memcache = NULL; var $b_connected= FALSE; - + function __construct() { $this->connect(); @@ -16,7 +16,7 @@ class gosa_cache $this->close(); if(class_exists("Memcache")){ $this->c_memcache = new Memcache; - $res = $this->c_memcache->connect("localhost",11211); + $res = $this->c_memcache->pconnect("localhost",11211); if(!$res){ $this->b_connected = FALSE; $this->c_memcache = NULL; 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} -- 2.30.2