From: hickert Date: Mon, 16 Nov 2009 07:33:27 +0000 (+0000) Subject: Updated dhcp service X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cf5a6a51f649373164b07738d228dc4e0e80bbec;p=gosa.git 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 --- 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 {