From 43fc77ccc0771853ccd8abd3c8d4a569676f692a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 15 Jun 2005 12:48:30 +0000 Subject: [PATCH] unused fields won't be checked anymore, git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@722 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_phoneGeneric.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc index 8e67b5af1..14a467dec 100644 --- a/plugins/admin/systems/class_phoneGeneric.inc +++ b/plugins/admin/systems/class_phoneGeneric.inc @@ -168,13 +168,18 @@ class phoneGeneric extends plugin /* 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 */ -- 2.30.2