Code

Fixed network configuration class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Jul 2008 08:41:05 +0000 (08:41 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Jul 2008 08:41:05 +0000 (08:41 +0000)
- MACisMust wasn't used in checks

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11601 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index b03088a1bd18142a30627306170b58e63cdb6a2b..25abd16aca153ac524056be272f4e781cdfc22b4 100644 (file)
@@ -611,10 +611,12 @@ class termDNS extends plugin
 
     /* Check if mac is empty 
      */
-    if ($this->macAddress == "" ){
-      $message[]= msgPool::required(_("MAC address"));
-    }elseif(!tests::is_mac($this->macAddress)){
-      $message[]= msgPool::invalid(_("MAC address"), "", "", "00:0C:7F:31:33:F1");
+    if($this->MACisMust || $this->dhcp_is_Account){
+      if ($this->macAddress == "" ){
+        $message[]= msgPool::required(_("MAC address"));
+      }elseif(!tests::is_mac($this->macAddress)){
+        $message[]= msgPool::invalid(_("MAC address"), "", "", "00:0C:7F:31:33:F1");
+      }
     }
 
     /* only perfrom this checks if this is a valid DNS account */