From cf5a6a51f649373164b07738d228dc4e0e80bbec Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 16 Nov 2009 07:33:27 +0000 Subject: [PATCH] Updated dhcp service -Fixed handling of dns server select box. closes #771 git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14814 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc index 44227cb2b..c84b1a1ba 100644 --- a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc +++ b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc @@ -61,10 +61,14 @@ class dhcpNetwork extends plugin $this->options->set('domain-name-servers',preg_replace('/,$/', '', $tmp)); } } + if ($acl_writeable && isset($_POST['delete_dns']) && isset($_POST['dnsserver'])){ $tmp= preg_replace("/(\s*,\s*)?".get_post('dnsserver')."/i", '', $this->options->get('domain-name-servers')); - $tmp= preg_replace("/(\s*)?,(\s*)?$/", '', $tmp); + $tmp= trim(preg_replace("/(\s*)?,(\s*)?$/", '', $tmp),","); + + + if ($tmp != ""){ $this->options->set('domain-name-servers', $tmp); } else { -- 2.30.2