summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c333063)
raw | patch | inline | side by side (parent: c333063)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 15 Jun 2005 12:48:30 +0000 (12:48 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 15 Jun 2005 12:48:30 +0000 (12:48 +0000) |
plugins/admin/systems/class_phoneGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc
index 8e67b5af174563a89c1b9568de7ae5f8dbf9c4ac..14a467dec0c2541260003561f2af9bd439193fae 100644 (file)
/* To check for valid ip*/
$num="(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])";
- if (!preg_match("/^$num\\.$num\\.$num\\.$num$/", $this->goFonDefaultIP)){
+
+ if(in_array("goFonDefaultIP",$this->usedattrs[$this->selected_categorie])){
+ if (!preg_match("/^$num\\.$num\\.$num\\.$num$/", $this->goFonDefaultIP)){
$message[]= _("Wrong IP format in field goFonDefaultIP.");
+ }
}
/* Check for valid number */
- if((strlen($this->goFonQualify))!=(strlen((int)($this->goFonQualify)))){
- $message[]= _("The given value for goFonQualify is not a valid number.");
+ if(in_array("goFonDefaultIP",$this->usedattrs[$this->selected_categorie])){
+ if((strlen($this->goFonQualify))!=(strlen((int)($this->goFonQualify)))){
+ $message[]= _("The given value for goFonQualify is not a valid number.");
+ }
}
/* must: cn, macAddress, ipHostNumber */