Code

Updated dhcp service
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Nov 2009 07:33:27 +0000 (07:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 16 Nov 2009 07:33:27 +0000 (07:33 +0000)
-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

gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpNetwork.inc

index 44227cb2bbc299af044e6589a5ade2db97808650..c84b1a1ba1f364c494e3f77f85ccb3e31f35320e 100644 (file)
@@ -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 {