summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7f09f07)
raw | patch | inline | side by side (parent: 7f09f07)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 1 Nov 2008 18:02:53 +0000 (18:02 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Sat, 1 Nov 2008 18:02:53 +0000 (18:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12854 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_ldap.inc | patch | blob | history |
index 2a0055bee7aa430756e8b230da21458903f3f859..8aa793cf1125952f874194a2b039c73393ce72ad 100644 (file)
/ => SL */
static function convert($dn)
{
- if (SPECIALS_OVERRIDE == TRUE){
- $tmp= preg_replace(array("/\\\\,/", "/\\\\2C/", "/\(/", "/\)/", "/\//"),
- array("\001CO", "\001CO", "\001OB", "\001CB", "\001SL"),
- $dn);
- return (preg_replace('/,\s+/', ',', $tmp));
+ if (SPECIALS_OVERRIDE === TRUE){
+ return preg_replace('/,\s+/', ',', str_replace(array('\\\\,', '\\\\2C', '\(/', '/\)', '\/'),
+ array("\001CO", "\001CO", "\001OB", "\001CB", "\001SL"), $dn));
} else {
return ($dn);
}
servers seem to take it the correct way. */
static function fix($dn)
{
- if (SPECIALS_OVERRIDE == TRUE){
- return (preg_replace(array("/\001CO/", "/\001OB/", "/\001CB/", "/\001SL/"),
- array("\,", "(", ")", "/"),
- $dn));
+ if (SPECIALS_OVERRIDE === TRUE){
+ return (str_replace(array('\001CO', '\001OB', '\001CB', '\001SL'),
+ array('\,', '(', ')', '/'), $dn));
} else {
return ($dn);
}