From: hickert Date: Wed, 10 Mar 2010 10:40:58 +0000 (+0000) Subject: Fixed filter encoding X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9dc6860cb171a53131515ca8e5cb5733ff3b43f8;p=gosa.git Fixed filter encoding git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16375 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_userFilter.inc b/gosa-core/include/class_userFilter.inc index 5e34c36f1..50e9e58e4 100644 --- a/gosa-core/include/class_userFilter.inc +++ b/gosa-core/include/class_userFilter.inc @@ -206,6 +206,7 @@ class userFilter extends plugin // Remove line breaks from the filter, which may were added for better reading. $c = preg_split('/\n/',$tmp['filter']); + foreach($c as $key => $str) $c[$key] = trim($str); $tmp['filter'] = implode($c); @@ -213,7 +214,10 @@ class userFilter extends plugin // ... and enabled. $visible = in_array('enable', $tmp['flags']) && ($attrs['dn'] == $ui->dn || in_array('share', $tmp['flags'])); - + + // Convert filter encoding + $tmp['filter'] = utf8_encode($tmp['filter']); + // Add filter if it matches the category list if($visible && (count($category) == 0 || array_intersect($category, $tmp['categories']))){ $filter[$tmp['name']] = $tmp;