Code

Only check for duplicated ip & mac if dns or dhcp is activated
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Oct 2007 11:16:53 +0000 (11:16 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Oct 2007 11:16:53 +0000 (11:16 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7511 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_termDNS.inc

index 5432e8ed2aa5b6b00b9a2b5e56a870d39860db9e..944ebc2bf877b446118b5691a117624472eaf7f0 100644 (file)
@@ -465,12 +465,12 @@ class termDNS extends plugin
     }
     
     /* Check if mac and ip are already used */
-    if(!empty($this->ipHostNumber) && 
+    if(!empty($this->ipHostNumber) && $this->DNS_is_account && 
         $this->ipHostNumber != $this->orig_ipHostNumber && 
         in_array("ip:".$this->ipHostNumber,$this->used_ip_mac)){
       $message[] =_("The specified IP address is already in use.");
     }
-    if(!empty($this->macAddress) && 
+    if(!empty($this->macAddress) && $this->dhcp_is_Account && 
         $this->macAddress != $this->orig_macAddress && 
         in_array("mac:".$this->macAddress,$this->used_ip_mac)){
       $message[] =_("The specified MAC address is already in use.");