From: hickert Date: Tue, 4 Oct 2005 11:31:22 +0000 (+0000) Subject: Hook descriptions, must removed. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e32288092af1a6a52b309e27e2c59380e963b6bf;p=gosa.git Hook descriptions, must removed. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1462 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiHook.inc b/plugins/admin/fai/class_faiHook.inc index 269c255ad..d4c21714b 100644 --- a/plugins/admin/fai/class_faiHook.inc +++ b/plugins/admin/fai/class_faiHook.inc @@ -169,7 +169,11 @@ class faiHook extends plugin $a_return=array(); foreach($this->SubObjects as $obj){ if($obj['status'] != "delete"){ - $a_return[$obj['cn']]= $obj['cn']." [".$obj['description']."]"; + if((isset($obj['description']))&&(!empty($obj['description']))){ + $a_return[$obj['cn']]= $obj['cn']." [".$obj['description']."]"; + }else{ + $a_return[$obj['cn']]= $obj['cn']; + } } } return($a_return); @@ -204,7 +208,7 @@ class faiHook 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,7 +268,7 @@ class faiHook extends plugin } $tmp['objectClass'] = $this->subClasses; - + $sub_dn = "cn=".$obj['cn'].",".$this->dn; if($obj['status'] == "delete"){ diff --git a/plugins/admin/fai/class_faiHookEntry.inc b/plugins/admin/fai/class_faiHookEntry.inc index a73c49382..3621552b0 100644 --- a/plugins/admin/fai/class_faiHookEntry.inc +++ b/plugins/admin/fai/class_faiHookEntry.inc @@ -82,10 +82,6 @@ class faiHookEntry 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/faiHook.tpl b/plugins/admin/fai/faiHook.tpl index 245852d6f..bd5790c06 100644 --- a/plugins/admin/fai/faiHook.tpl +++ b/plugins/admin/fai/faiHook.tpl @@ -16,7 +16,7 @@ diff --git a/plugins/admin/fai/faiHookEntry.tpl b/plugins/admin/fai/faiHookEntry.tpl index c74f41988..d2a4f0ea0 100644 --- a/plugins/admin/fai/faiHookEntry.tpl +++ b/plugins/admin/fai/faiHookEntry.tpl @@ -14,7 +14,7 @@ - {t}Description{/t}{$must}  + {t}Description{/t}