Code

Made autonet button work again
[gosa.git] / gosa-plugins / systems / admin / systems / class_termDNS.inc
index df1944d3eb519a0095a8a05ce9b8c1e6224186e9..62d6f6890ad2869ddc9922669a66e36c3a4ba5fd 100644 (file)
@@ -258,7 +258,7 @@ class termDNS extends plugin
   {
          /* Call parent execute */
     $smarty= get_smarty();
-    $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress").$this->acl_is_writeable("ipHostNumber"));
+    $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress") && $this->acl_is_writeable("ipHostNumber")?"rw":"");
 
     $tmp = $this->plInfo();
     foreach($tmp['plProvidedAcls'] as $name => $translation){
@@ -459,7 +459,7 @@ class termDNS extends plugin
       $smarty->assign("changeStateForRecords",$changeStateForRecords);
       $smarty->assign("staticAddress","<font class=\"must\">*</font>");
 
-      $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress").$this->acl_is_writeable("ipHostNumber"));
+      $smarty->assign("autonetACL",$this->acl_is_writeable("macAddress") && $this->acl_is_writeable("ipHostNumber")?"rw":"");
 
       $display.= $smarty->fetch(get_template_path('network.tpl', TRUE));
     }
@@ -721,7 +721,7 @@ class termDNS extends plugin
     }
 
     /* Do not add the objectClass ipHost if no ip address is given */
-    if(!$this->attrs['ipHostNumber']){
+    if(!isset($this->attrs['ipHostNumber'])){
       $this->attrs['objectClass'] = array_remove_entries(array("ipHost"),$this->attrs['objectClass']);
     }