summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a4040c)
raw | patch | inline | side by side (parent: 9a4040c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Feb 2010 11:08:10 +0000 (11:08 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Feb 2010 11:08:10 +0000 (11:08 +0000) |
-Updated regex to allow to search for numeric values,
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15610 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15610 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filter.inc | patch | blob | history |
index 51ffec05ec18e0656f35b6d17a3a1a3ac4fa9e07..f44e39dcb5ec03c9cead94245d24390b19123e8b 100644 (file)
$e_unset= is_array($element['unset'])?"":$element['unset'];
}
+ // Do not replace escaped \$ - This is required to be able to search for e.g. windows machines.
if ($this->elementValues[$tag] == "") {
- $e_unset= preg_replace('/([^\\\\])\$/', "\\1".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('/([^\\\\])\$/', "\\1".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);
}