Révision 5136ce55
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/ldap/ldap_servers/ldap_servers.functions.inc | ||
---|---|---|
379 | 379 |
*/ |
380 | 380 |
|
381 | 381 |
function ldap_pear_hex2asc($string) { |
382 |
|
|
383 |
if (version_compare(PHP_VERSION, '5.3.0') >= 0) { |
|
382 | 384 |
$string = preg_replace_callback( |
383 | 385 |
"/\\\([0-9A-Fa-f]{2})/", |
384 | 386 |
function ($m){ |
385 | 387 |
return chr(hexdec($m[1])); |
386 | 388 |
}, |
387 | 389 |
$string); |
390 |
} |
|
391 |
else { |
|
392 |
$string = preg_replace("/\\\([0-9A-Fa-f]{2})/e", "''.chr(hexdec('\\1')).''", $string); |
|
393 |
} |
|
388 | 394 |
|
389 |
return $string;
|
|
395 |
return $string; |
|
390 | 396 |
} |
391 | 397 |
|
392 | 398 |
/** |
Formats disponibles : Unified diff
Weekly update of contrib modules