Code

- Corrected attr in place of attrs
[gosa.git] / include / class_dhcpPlugin.inc
index 93c5b507a6dcd76725beb4d01abad8c649d161cc..b13083fb3f7431eaf0466f2047881c4293ccf9b5 100644 (file)
@@ -104,7 +104,7 @@ class dhcpPlugin extends plugin
     foreach (array("routers", "domain-name", "subnet-mask", "broadcast-address") as $toberemoved){
       unset($this->options[$toberemoved]);
     }
-    foreach (array("filename", "next-server") as $toberemoved){
+    foreach (array("filename", "next-server","get-lease-hostnames","use-host-decl-names") as $toberemoved){
       unset($this->statements[$toberemoved]);
     }
 
@@ -114,8 +114,7 @@ class dhcpPlugin extends plugin
 
     /* Merge arrays for advanced view */
     foreach (array("options", "statements") as $type){
-      $tmp= array_merge($this->$type, $this->network->$type);
-      $this->advanced->$type= $tmp;
+      $this->advanced->$type= $this->$type + $this->network->$type;;
     }
   }
 
@@ -124,7 +123,6 @@ class dhcpPlugin extends plugin
   function check($cache)
   {
     $message= array();
-
     return $message;
   }
 
@@ -134,8 +132,7 @@ class dhcpPlugin extends plugin
   {
     /* Merge arrays for network and advanced view */
     foreach (array("options", "statements") as $type){
-      $tmp= array_merge($this->$type, $this->network->$type, $this->advanced->$type);
-      $this->$type= $tmp;
+      $this->$type= $this->$type + $this->network->$type + $this->advanced->$type;
     }
 
     /* Add cn if we're new */
@@ -198,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]);
+    }
+  }
+
 }
 
 ?>