From 60faf8f243c64d9ce59c35b8b2ccf4c6ca28396d Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 31 Aug 2007 05:55:25 +0000 Subject: [PATCH] Updated department listing - preg_match wasn't escaped correctly git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7172 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/departments/class_divListDepartment.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc index 97a913380..6d6595ace 100755 --- a/plugins/admin/departments/class_divListDepartment.inc +++ b/plugins/admin/departments/class_divListDepartment.inc @@ -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"; } } -- 2.30.2