From: cajus Date: Tue, 15 Jan 2008 13:26:54 +0000 (+0000) Subject: Added function to prepare4ldap X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3c58d838ec5b7bfc78e14eeab3e40170f8d50d2b;p=gosa.git Added function to prepare4ldap git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@8356 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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;