Code

Added - to be valid in description for FAI objects.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Sep 2005 05:04:07 +0000 (05:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Sep 2005 05:04:07 +0000 (05:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1353 594d385d-05f5-0310-b6e9-bd551577e9d8

12 files changed:
plugins/admin/FAI/class_faiHook.inc
plugins/admin/FAI/class_faiHookEntry.inc
plugins/admin/FAI/class_faiPackage.inc
plugins/admin/FAI/class_faiPartitionTable.inc
plugins/admin/FAI/class_faiPartitionTableEntry.inc
plugins/admin/FAI/class_faiProfile.inc
plugins/admin/FAI/class_faiScript.inc
plugins/admin/FAI/class_faiScriptEntry.inc
plugins/admin/FAI/class_faiTemplate.inc
plugins/admin/FAI/class_faiTemplateEntry.inc
plugins/admin/FAI/class_faiVariable.inc
plugins/admin/FAI/class_faiVariableEntry.inc

index 5aa6423b873214c02dee66690426413a52deecba..c7edf194ca907c2fc3d688fb3f49ec2215f4c64e 100644 (file)
@@ -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);
index 56da7fa9d5b707a54a7a2a8c8a907f6863e34ed5..a73c49382d4c42944bf2faec9acc160397f77d0b 100644 (file)
@@ -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.");
     }
 
index e956944c1589cd07af379b916c3a618dcea8c8bc..78c9a18b69afb9da0554bd887e281efde1edd007 100644 (file)
@@ -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);
index e8735f79d7564c436dadbd35ee6b10abf652d501..db65fed8545ccba3f6e724d4a42bf8a208918ee3 100644 (file)
@@ -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.");
     }
 
index 1367cbb022ffb17d639be07148d8e39c875cc711..11c454ebb52eb4c8718e6fc98c46aa95994c6f63 100644 (file)
@@ -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.");
     }
     
index 744ac8346f1470da454eebb89fddba611212b470..517b85240a2ac9a24ec7fde3d1384626292f0465 100644 (file)
@@ -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.");
     }
     
index f81b0d4c378b748ea45fcdc32b8cc16208c3b008..3ee246aca9c9781b2e3b23c062a79f253a3690f8 100644 (file)
@@ -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);
index 43793ebac8b31543edfb0e506a51e8c57bdf8ead..903230055977e3de746c576b549f0be8bc5e72ca 100644 (file)
@@ -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.");
     }
 
index d2fbbeebd19fe0abeba66b76a9b1b12b3e2734a6..2c43775436fd570e98393b3b1c8c00dfaebd3621 100644 (file)
@@ -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);
index 2ba9a9bc4a1a71c28f3d305ee9b38079c0d6edb5..24d8d821bb74acdcf8d31640c541617e1741945c 100644 (file)
@@ -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.");
     }
 
index 59edea52dac50199aa81e37492eb577a06c092aa..606f18c3ed99a55f883124fc076fa62911413151 100644 (file)
@@ -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);
index 3db0d40c766667ec28baf9805e990c2245918625..3f993cb90c9c0a4bdd56f19364261976074734b6 100644 (file)
@@ -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.");
     }