From: tokul Date: Sun, 8 Aug 2004 15:02:24 +0000 (+0000) Subject: xtra_code updates in compose, readbody and view_text scripts X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=f4bb5d22a27e71a16f00bf41238c8a2fdcbf4e3a xtra_code updates in compose, readbody and view_text scripts git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7857 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/compose.php b/src/compose.php index b24dde7c..80e48826 100644 --- a/src/compose.php +++ b/src/compose.php @@ -631,9 +631,9 @@ function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $se $bodypart = strip_tags($bodypart); } if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && - function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { + function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_decode')) { if (mb_detect_encoding($bodypart) != 'ASCII') { - $bodypart = $languages[$squirrelmail_language]['XTRA_CODE']('decode', $bodypart); + $bodypart = call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_decode', $bodypart); } } @@ -840,8 +840,8 @@ function getAttachments($message, &$composeMessage, $passed_id, $entities, $imap } $filename = str_replace(' ', ' ', decodeHeader($filename)); if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && - function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { - $filename = $languages[$squirrelmail_language]['XTRA_CODE']('encode', $filename); + function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_encode')) { + $filename = call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_encode', $filename); } $localfilename = GenerateRandomString(32, '', 7); $full_localfilename = "$hashed_attachment_dir/$localfilename"; diff --git a/src/read_body.php b/src/read_body.php index cf0d3b2f..31cd0a47 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -192,8 +192,8 @@ function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) { $special_encoding = ''; if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && - function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { - $body = $languages[$squirrelmail_language]['XTRA_CODE']('encode', $body); + function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_encode')) { + $body = call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_encode', $body); if (strtolower($default_charset) == 'iso-2022-jp') { if (mb_detect_encoding($body) == 'ASCII') { $special_encoding = '8bit'; diff --git a/src/view_text.php b/src/view_text.php index 01b8bb2a..9e316625 100644 --- a/src/view_text.php +++ b/src/view_text.php @@ -64,9 +64,9 @@ $body = mime_fetch_body($imapConnection, $passed_id, $ent_id); $body = decodeBody($body, $encoding); if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && - function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { + function_exists($languages[$squirrelmail_language]['XTRA_CODE'].'_decode')) { if (mb_detect_encoding($body) != 'ASCII') { - $body = $languages[$squirrelmail_language]['XTRA_CODE']('decode', $body); + $body = call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_decode', $body); } }