forked from extern/egroupware
renamed ldap::ldapAddslashes to ldap::quote, like in db::quote or preg_quote
This commit is contained in:
parent
b2a0081696
commit
2c87623e9b
@ -273,7 +273,7 @@
|
||||
{
|
||||
$GLOBALS['egw']->ldap =& CreateObject('phpgwapi.ldap');
|
||||
}
|
||||
return $GLOBALS['egw']->ldap->ldap_addslashes($string);
|
||||
return ldap::quote($string);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -69,9 +69,10 @@
|
||||
* Escaped Characters are: '*', '(', ')', ' ', '\', NUL
|
||||
* It's actually a PHP-Bug, that we have to escape space.
|
||||
* For all other Characters, refer to RFC2254.
|
||||
* @param $string either a string to be escaped, or an array of values to be escaped
|
||||
*
|
||||
* @param string/array $string either a string to be escaped, or an array of values to be escaped
|
||||
*/
|
||||
function ldapAddslashes($string='')
|
||||
function quote($string)
|
||||
{
|
||||
return str_replace(array('\\','*','(',')','\0',' '),array('\\\\','\*','\(','\)','\\0','\20'),$string);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user