From d3665b5ddfdec67da1957fd9fa5ef45a06534c4a Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 2 Feb 2010 10:01:20 +0000 Subject: [PATCH] Updated filter to not strip out first occurrence git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15571 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_filter.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_filter.inc b/gosa-core/include/class_filter.inc index efd72574e..1127a246b 100644 --- a/gosa-core/include/class_filter.inc +++ b/gosa-core/include/class_filter.inc @@ -408,15 +408,16 @@ class filter { } if ($this->elementValues[$tag] == "") { - $e_unset= preg_replace('/[^\\\\]\$/', normalizeLdap($this->elementValues[$tag]), $e_unset); + $e_unset= preg_replace('/([^\\\\])\$/', "\\1".normalizeLdap($this->elementValues[$tag]), $e_unset); $e_unset= preg_replace('/\\\\\$/','$', $e_unset); $filter= preg_replace("/\\$$tag/", $e_unset, $filter); } else { - $e_set= preg_replace('/[^\\\\]\$/', normalizeLdap($this->elementValues[$tag]), $e_set); + $e_set= preg_replace('/([^\\\\])\$/', "\\1".normalizeLdap($this->elementValues[$tag]), $e_set); $e_set= preg_replace('/\\\\\$/','$', $e_set); $filter= preg_replace("/\\$$tag/", $e_set, $filter); } } + echo $filter; $result= array_merge($result, call_user_func(array($backend, 'query'), $this->base, $this->scope, $filter, $attributes, $this->category, $this->objectStorage)); } -- 2.30.2