Code

Updated department listing - preg_match wasn't escaped correctly
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 31 Aug 2007 05:55:25 +0000 (05:55 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 31 Aug 2007 05:55:25 +0000 (05:55 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7172 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/departments/class_divListDepartment.inc

index 97a913380d88f60288eae22fe68a7ab769874962..6d6595ace93a0e93a85a06f7b9a11ab6362c0dc5 100755 (executable)
@@ -173,10 +173,13 @@ class divListDepartment extends MultiSelectWindow
         $this->config->departments[trim($key)]="";
       }
 
+      /* check if this department contains sub-departments
+         Display different image in this case
+       */
       $non_empty="";
-      $keys= str_replace("/","\/",$key);
+      $nkey= normalizePreg($key);
       foreach($this->config->departments as $keyd=>$vald ){
-        if(preg_match("/".$keys."\/.*/",$keyd)){
+        if(preg_match('/$nkey\/.*/',$keyd)){
           $non_empty="full";
         }
       }