From: hickert Date: Wed, 14 Sep 2005 05:04:07 +0000 (+0000) Subject: Added - to be valid in description for FAI objects. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e570d4616017863eaf5d48b4284de1339b4dceb8;p=gosa.git Added - to be valid in description for FAI objects. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1353 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/FAI/class_faiHook.inc b/plugins/admin/FAI/class_faiHook.inc index 5aa6423b8..c7edf194c 100644 --- a/plugins/admin/FAI/class_faiHook.inc +++ b/plugins/admin/FAI/class_faiHook.inc @@ -204,7 +204,7 @@ class faiHook extends plugin { $message= array(); $str = utf8_encode("üöä"); - if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->description))){ + if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\-.,;:_\? ]/i",$this->description))){ $message[]=_("Please enter a valid description."); } return ($message); diff --git a/plugins/admin/FAI/class_faiHookEntry.inc b/plugins/admin/FAI/class_faiHookEntry.inc index 56da7fa9d..a73c49382 100644 --- a/plugins/admin/FAI/class_faiHookEntry.inc +++ b/plugins/admin/FAI/class_faiHookEntry.inc @@ -86,7 +86,7 @@ class faiHookEntry extends plugin $message[] = _("Please enter a description."); } - if(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->Object_description)){ + if(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->Object_description)){ $message[] = _("Invalid character in description. Please enter a valid description."); } diff --git a/plugins/admin/FAI/class_faiPackage.inc b/plugins/admin/FAI/class_faiPackage.inc index e956944c1..78c9a18b6 100644 --- a/plugins/admin/FAI/class_faiPackage.inc +++ b/plugins/admin/FAI/class_faiPackage.inc @@ -106,7 +106,10 @@ class faiPackage extends plugin { $message= array(); $str = utf8_encode("üöä"); - if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->description))){ + if((empty($this->description))){ + $message[]=_("Please enter a valid description."); + } + if((preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description))){ $message[]=_("Please enter a valid description."); } return ($message); diff --git a/plugins/admin/FAI/class_faiPartitionTable.inc b/plugins/admin/FAI/class_faiPartitionTable.inc index e8735f79d..db65fed85 100644 --- a/plugins/admin/FAI/class_faiPartitionTable.inc +++ b/plugins/admin/FAI/class_faiPartitionTable.inc @@ -258,7 +258,7 @@ class faiPartitionTable extends plugin $message= array(); $str = utf8_encode("üöä"); - if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->description))){ + if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description))){ $message[]=_("Please enter a valid description."); } diff --git a/plugins/admin/FAI/class_faiPartitionTableEntry.inc b/plugins/admin/FAI/class_faiPartitionTableEntry.inc index 1367cbb02..11c454ebb 100644 --- a/plugins/admin/FAI/class_faiPartitionTableEntry.inc +++ b/plugins/admin/FAI/class_faiPartitionTableEntry.inc @@ -295,7 +295,7 @@ class faiPartitionTableEntry extends plugin } $str = utf8_encode("üöä"); - if(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->DISK_description)){ + if(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->DISK_description)){ $message[]=_("Please enter a valid description."); } diff --git a/plugins/admin/FAI/class_faiProfile.inc b/plugins/admin/FAI/class_faiProfile.inc index 744ac8346..517b85240 100644 --- a/plugins/admin/FAI/class_faiProfile.inc +++ b/plugins/admin/FAI/class_faiProfile.inc @@ -209,7 +209,7 @@ class faiProfile extends plugin $message[] =_("Please specify a description for this profile."); } - if((preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->description))){ + if((preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description))){ $message[]=_("Please enter a valid description."); } diff --git a/plugins/admin/FAI/class_faiScript.inc b/plugins/admin/FAI/class_faiScript.inc index f81b0d4c3..3ee246aca 100644 --- a/plugins/admin/FAI/class_faiScript.inc +++ b/plugins/admin/FAI/class_faiScript.inc @@ -194,7 +194,7 @@ class faiScript extends plugin { $message= array(); $str = utf8_encode("üöä"); - if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->description))){ + if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description))){ $message[]=_("Please enter a valid description."); } return ($message); diff --git a/plugins/admin/FAI/class_faiScriptEntry.inc b/plugins/admin/FAI/class_faiScriptEntry.inc index 43793ebac..903230055 100644 --- a/plugins/admin/FAI/class_faiScriptEntry.inc +++ b/plugins/admin/FAI/class_faiScriptEntry.inc @@ -98,7 +98,7 @@ class faiScriptEntry extends plugin $message[] = _("Please enter a description."); } - if(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->Object_description)){ + if(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->Object_description)){ $message[] = _("Invalid character in description. Please enter a valid description."); } diff --git a/plugins/admin/FAI/class_faiTemplate.inc b/plugins/admin/FAI/class_faiTemplate.inc index d2fbbeebd..2c4377543 100644 --- a/plugins/admin/FAI/class_faiTemplate.inc +++ b/plugins/admin/FAI/class_faiTemplate.inc @@ -194,7 +194,7 @@ class faiTemplate extends plugin { $message= array(); $str = utf8_encode("üöä"); - if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->description))){ + if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description))){ $message[]=_("Please enter a valid description."); } return ($message); diff --git a/plugins/admin/FAI/class_faiTemplateEntry.inc b/plugins/admin/FAI/class_faiTemplateEntry.inc index 2ba9a9bc4..24d8d821b 100644 --- a/plugins/admin/FAI/class_faiTemplateEntry.inc +++ b/plugins/admin/FAI/class_faiTemplateEntry.inc @@ -87,7 +87,7 @@ class faiTemplateEntry extends plugin $message[] = _("Please enter a description."); } - if(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->Object_description)){ + if(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->Object_description)){ $message[] = _("Invalid character in description. Please enter a valid description."); } diff --git a/plugins/admin/FAI/class_faiVariable.inc b/plugins/admin/FAI/class_faiVariable.inc index 59edea52d..606f18c3e 100644 --- a/plugins/admin/FAI/class_faiVariable.inc +++ b/plugins/admin/FAI/class_faiVariable.inc @@ -194,7 +194,7 @@ class faiVariable extends plugin { $message= array(); $str = utf8_encode("üöä"); - if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->description))){ + if((empty($this->description))||(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description))){ $message[]=_("Please enter a valid description."); } return ($message); diff --git a/plugins/admin/FAI/class_faiVariableEntry.inc b/plugins/admin/FAI/class_faiVariableEntry.inc index 3db0d40c7..3f993cb90 100644 --- a/plugins/admin/FAI/class_faiVariableEntry.inc +++ b/plugins/admin/FAI/class_faiVariableEntry.inc @@ -81,7 +81,7 @@ class faiVariableEntry extends plugin $message[] = _("Please enter a description."); } - if(preg_match("/[^a-z0-9".$str."\.,;:-_\? ]/i",$this->Object_description)){ + if(preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->Object_description)){ $message[] = _("Invalid character in description. Please enter a valid description."); }