From 3c58d838ec5b7bfc78e14eeab3e40170f8d50d2b Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 15 Jan 2008 13:26:54 +0000 Subject: [PATCH] Added function to prepare4ldap git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@8356 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_ldap.inc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/class_ldap.inc b/include/class_ldap.inc index ebc844451..223d0de12 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -94,6 +94,14 @@ class LDAP{ } + /* Function to fix problematic characters in DN's that are used for search + requests. I.e. member=.... */ + static function prepare4filter($dn) + { + return normalizeLdap(preg_replace('/\\\\/', '\\\\\\', LDAP::fix($dn))); + } + + function connect() { $this->hascon=false; -- 2.30.2