Code

Hook descriptions, must removed.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Oct 2005 11:31:22 +0000 (11:31 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 Oct 2005 11:31:22 +0000 (11:31 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1462 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/fai/class_faiHook.inc
plugins/admin/fai/class_faiHookEntry.inc
plugins/admin/fai/faiHook.tpl
plugins/admin/fai/faiHookEntry.tpl

index 269c255ad9a50eb198fb621a257ac9e104ea4e44..d4c21714b370402d628cf3dc1e61b7c032713d2d 100644 (file)
@@ -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"){
index a73c49382d4c42944bf2faec9acc160397f77d0b..3621552b0f9648d3eb09ec710e4f89f6197cf6e9 100644 (file)
@@ -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.");
     }
index 245852d6fd0284cd4c7f3f23bcca5bb3c13958e7..bd5790c06d6ba1fae50c864b22d4e7a53e7283d4 100644 (file)
@@ -16,7 +16,7 @@
                                        <tr>
                                                <td>
                                                        <LABEL for="description">
-                                                       {t}Description{/t}{$must}
+                                                       {t}Description{/t}
                                                        </LABEL>
                                                </td>
                                                <td>
index c74f419885257b4cf3f741252a495f7ad575fc86..d2a4f0ea00c3ef07c0077a4d883c6bf87b4c35b7 100644 (file)
@@ -14,7 +14,7 @@
                                        </tr>
                                        <tr>
                                                <td>
-                                                       {t}Description{/t}{$must}&nbsp;
+                                                       {t}Description{/t}&nbsp;
                                                </td>
                                                <td>
                                                        <input value="{$Object_description}" name="Object_description">