From: hickert Date: Tue, 4 Oct 2005 12:16:43 +0000 (+0000) Subject: Removed must tag from description field X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=38028cb0e829bf0dfbb4ff32dc0640eb480125ea;p=gosa.git Removed must tag from description field git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1467 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiTemplate.inc b/plugins/admin/fai/class_faiTemplate.inc index 30bd188c5..6792e36a2 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((preg_match("/[^a-z0-9".$str."\.,;:\-_\? ]/i",$this->description))){ $message[]=_("Please enter a valid description."); } return ($message); @@ -264,6 +264,10 @@ class faiTemplate extends plugin $ldap->modify($tmp); $this->handle_post_events("modify"); }elseif($obj['status']=="new"){ + + if($tmp['description']==array()){ + unset($tmp['description']); + } $ldap->cd($this->config->current['BASE']); $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $sub_dn)); $ldap->cd($sub_dn); diff --git a/plugins/admin/fai/class_faiTemplateEntry.inc b/plugins/admin/fai/class_faiTemplateEntry.inc index 24d8d821b..4476c5485 100644 --- a/plugins/admin/fai/class_faiTemplateEntry.inc +++ b/plugins/admin/fai/class_faiTemplateEntry.inc @@ -83,10 +83,6 @@ class faiTemplateEntry extends plugin $str = utf8_encode("üöä"); - if(empty($this->Object_description)){ - $message[] = _("Please enter a 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/faiProfile.tpl b/plugins/admin/fai/faiProfile.tpl index 7eec2e8b6..b38b3377a 100644 --- a/plugins/admin/fai/faiProfile.tpl +++ b/plugins/admin/fai/faiProfile.tpl @@ -13,7 +13,7 @@ diff --git a/plugins/admin/fai/faiTemplate.tpl b/plugins/admin/fai/faiTemplate.tpl index b22bc9102..ed3d004cd 100644 --- a/plugins/admin/fai/faiTemplate.tpl +++ b/plugins/admin/fai/faiTemplate.tpl @@ -6,7 +6,7 @@ @@ -16,7 +16,7 @@ diff --git a/plugins/admin/fai/faiTemplateEntry.tpl b/plugins/admin/fai/faiTemplateEntry.tpl index e0fda071b..e7ef3a721 100644 --- a/plugins/admin/fai/faiTemplateEntry.tpl +++ b/plugins/admin/fai/faiTemplateEntry.tpl @@ -14,7 +14,7 @@ - {t}Description{/t}{$must}  + {t}Description{/t}