Code

Fixed mac Address check
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 14:40:20 +0000 (14:40 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 10 Apr 2008 14:40:20 +0000 (14:40 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10337 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/systems/admin/systems/class_termDNS.inc

index 940da119d8d0a9bfaa0d6e82b66ed036019ca4d6..ec310e64ea433aeab2b2162af680136180b71147 100644 (file)
@@ -594,9 +594,7 @@ class termDNS extends plugin
     if(($this->IPisMust)||($this->DNS_is_account)){
       if (empty($this->ipHostNumber)){
         $message[]= msgPool::required(_("IP address"));
-      }
-
-      if (!tests::is_ip($this->ipHostNumber)){
+      }elseif (!tests::is_ip($this->ipHostNumber)){
         $message[]= msgPool::invalid(_("IP address"), "", "", "192.168.1.10");
       }
     }
@@ -604,9 +602,8 @@ class termDNS extends plugin
     /* Check if mac is empty 
      */
     if ($this->macAddress == "" ){
-      $message[]= msgPool::required(_("IP address"));
-    }
-    if(!tests::is_mac($this->macAddress)){
+      $message[]= msgPool::required(_("MAC address"));
+    }elseif(!tests::is_mac($this->macAddress)){
       $message[]= msgPool::invalid(_("MAC address"), "", "", "00:0C:7F:31:33:F1");
     }