From: hickert Date: Fri, 24 Oct 2008 14:57:55 +0000 (+0000) Subject: Updated termDNS check. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d9984f28d43d55bc4f5413f46e0d6f589daf94ad;p=gosa.git Updated termDNS check. -Ensure that a valid macAddress is given git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@12775 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_termDNS.inc b/plugins/admin/systems/class_termDNS.inc index 9e90cb8bf..5f861551e 100644 --- a/plugins/admin/systems/class_termDNS.inc +++ b/plugins/admin/systems/class_termDNS.inc @@ -454,12 +454,12 @@ class termDNS extends plugin if ($this->macAddress == "" && chkacl ($this->acl, "macAddress") == ""){ $message[]= _("The required field 'MAC-address' is not set."); } + } - /* Check if given mac is valid mac - */ - if(!is_mac($this->macAddress)){ - $message[]=(_("The given macaddress is invalid. There must be 6 2byte segments seperated by ':'.")); - } + /* Check if given mac is valid mac + */ + if(!empty($this->macAddress) && !is_mac($this->macAddress)){ + $message[]=(_("The given macaddress is invalid. There must be 6 2byte segments seperated by ':'.")); } /* only perfrom this checks if this is a valid DNS account */