From 644fe2211db164730d12a7aa91342f699329fe00 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 10 Apr 2008 14:40:20 +0000 Subject: [PATCH] Fixed mac Address check git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10337 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-plugins/systems/admin/systems/class_termDNS.inc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/gosa-plugins/systems/admin/systems/class_termDNS.inc b/gosa-plugins/systems/admin/systems/class_termDNS.inc index 940da119d..ec310e64e 100644 --- a/gosa-plugins/systems/admin/systems/class_termDNS.inc +++ b/gosa-plugins/systems/admin/systems/class_termDNS.inc @@ -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"); } -- 2.30.2