X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fimap_utf7_local.php;h=c2c9ae538d97f1239848477a1e4c28cea8775b26;hb=d0928dd58d8a1163ff037ac0f30d90693d61ab64;hp=45694fb49e75e1a41973ea37dc1e267383293b28;hpb=76911253eb850bacde3d86c8cb7b4af072e67ebe;p=squirrelmail.git diff --git a/functions/imap_utf7_local.php b/functions/imap_utf7_local.php index 45694fb4..c2c9ae53 100644 --- a/functions/imap_utf7_local.php +++ b/functions/imap_utf7_local.php @@ -12,6 +12,13 @@ */ function imap_utf7_encode_local($s) { + global $languages, $squirrelmail_language; + + if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && + function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { + return $languages[$squirrelmail_language]['XTRA_CODE']('utf7-imap_encode', $s); + } + $b64_s = ''; // buffer for substring to be base64-encoded $utf7_s = ''; // imap-utf7-encoded string for ($i = 0; $i < strlen($s); $i++) { @@ -45,6 +52,13 @@ function imap_utf7_encode_local($s) { } function imap_utf7_decode_local($s) { + global $languages, $squirrelmail_language; + + if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && + function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { + return $languages[$squirrelmail_language]['XTRA_CODE']('utf7-imap_decode', $s); + } + $b64_s = ''; $iso_8859_1_s = ''; for ($i = 0, $len = strlen($s); $i < $len; $i++) { @@ -159,4 +173,4 @@ function decodeBASE64($s) { return $d; } -?> +?> \ No newline at end of file