X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fview_text.php;h=54ddf14217f278a8ecb0bd2983ce4e4af37e2e2f;hb=43a312983930fcca20ceb70047c162a2d359706d;hp=803c4ac3766160e19d9f28f1c1e9662f7cd0d663;hpb=3267e4d87ff78d4e29755ccc36fb236b0d529cd5;p=squirrelmail.git diff --git a/src/view_text.php b/src/view_text.php index 803c4ac3..54ddf142 100644 --- a/src/view_text.php +++ b/src/view_text.php @@ -18,29 +18,30 @@ define('SM_PATH','../'); /* SquirrelMail required files. */ require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/global.php'); require_once(SM_PATH . 'functions/imap.php'); require_once(SM_PATH . 'functions/mime.php'); require_once(SM_PATH . 'functions/html.php'); - -$mailbox = urldecode($_GET['mailbox']); -if (!isset($_GET['passed_ent_id'])) { - $passed_ent_id = ''; -} else { - $passed_ent_id = $_GET['passed_ent_id']; + +sqgetGlobalVar('key', $key, SQ_COOKIE); +sqgetGlobalVar('username', $username, SQ_SESSION); +sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); +sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); +sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER); +sqgetGlobalVar('messages', $messages); +sqgetGlobalVar('passed_id', $passed_id, SQ_GET); + +if ( sqgetGlobalVar('mailbox', $temp, SQ_GET) ) { + $mailbox = $temp; } -$passed_id = $_GET['passed_id']; -if (isset($_GET['ent_id'])) { - $ent_id = $_GET['ent_id']; -} else { - $ent_id = ''; +if ( !sqgetGlobalVar('ent_id', $ent_id, SQ_GET) ) { + $ent_id = ''; } +if ( !sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) { + $passed_ent_id = ''; +} + -$username = $_SESSION['username']; -$key = $_COOKIE['key']; -$delimiter = $_SESSION['delimiter']; -$onetimepad = $_SESSION['onetimepad']; -$QUERY_STRING = $_SERVER['QUERY_STRING']; -sqgetGlobalVar('messages', $messages); $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox); @@ -78,6 +79,14 @@ echo '
'. "". "
". "
"; + + if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && + function_exists($languages[$squirrelmail_language]['XTRA_CODE'])) { + if (mb_detect_encoding($body) != 'ASCII') { + $body = $languages[$squirrelmail_language]['XTRA_CODE']('decode', $body); + } + } + if ($type1 == 'html' || (isset($override_type1) && $override_type1 == 'html')) { $body = MagicHTML( $body, $passed_id, $message, $mailbox); } else {