parent
73b7795bc0
commit
c494078550
@ -1117,12 +1117,12 @@ class ldap extends DS {
|
|||||||
if (is_array($dn)) {
|
if (is_array($dn)) {
|
||||||
$a = array();
|
$a = array();
|
||||||
foreach ($dn as $key => $rdn) {
|
foreach ($dn as $key => $rdn) {
|
||||||
$a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function($m) { return "''.chr(hexdec('${m[1]}')).''"; }, $rdn);
|
$a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function($m) { return chr(hexdec('${m[1]}')); }, $rdn);
|
||||||
}
|
}
|
||||||
return $a;
|
return $a;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function($m) { return "''.chr(hexdec('${m[1]}')).''"; }, $dn);
|
return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function($m) { return chr(hexdec('${m[1]}')); }, $dn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2506,7 +2506,9 @@ function draw_chooser_link($form,$element,$include_choose_text=true,$rdn='none')
|
|||||||
*/
|
*/
|
||||||
function ldap_explode_dn_patch($dn,$with_attrib) {
|
function ldap_explode_dn_patch($dn,$with_attrib) {
|
||||||
$result = ldap_explode_dn($dn,$with_attrib);
|
$result = ldap_explode_dn($dn,$with_attrib);
|
||||||
if (! $result ) return null;
|
if (! $result)
|
||||||
|
return null;
|
||||||
|
|
||||||
# translate hex code into ascii again
|
# translate hex code into ascii again
|
||||||
foreach ($result as $key => $value) {
|
foreach ($result as $key => $value) {
|
||||||
$result[$key] = preg_replace_callback(
|
$result[$key] = preg_replace_callback(
|
||||||
@ -2517,8 +2519,8 @@ function ldap_explode_dn_patch( $dn, $with_attrib ) {
|
|||||||
$value
|
$value
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ( $result );
|
|
||||||
|
|
||||||
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user