Code

Added robustness fix
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Jun 2006 11:59:43 +0000 (11:59 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 6 Jun 2006 11:59:43 +0000 (11:59 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@3657 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_ldap.inc

index b6a11be99f2d8a1dbe8a99607abd0a983040e94e..7b82a8b327bf262cc2a9804681c47bfc3b71f7b4 100644 (file)
@@ -65,9 +65,10 @@ class LDAP{
   function convert($dn)
   {
     if (SPECIALS_OVERRIDE == TRUE){
-      return (preg_replace(array("/\\\\,/", "/\\\\2C/", "/\(/", "/\)/", "/\//"),
+      $tmp= preg_replace(array("/\\\\,/", "/\\\\2C/", "/\(/", "/\)/", "/\//"),
                            array("\001CO", "\001CO", "\001OB", "\001CB", "\001SL"),
-                           $dn));
+                           $dn);
+      return (preg_replace('/,\s+/', ',', $tmp));
     } else {
       return ($dn);
     }