X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fview_text.php;h=e1ddde570290a1c198e09618d4e8db1614b2ebfa;hp=2b983cb940b82060b78d4d015cb397845230e675;hb=f498a104a0e1dd4bef4cc11b881e9b87481dba38;hpb=460aef76de99c847de9449bb099caf040fec6776 diff --git a/src/view_text.php b/src/view_text.php index 2b983cb9..e1ddde57 100644 --- a/src/view_text.php +++ b/src/view_text.php @@ -1,21 +1,10 @@ getEntity($passed_ent_id); - + $message = &$message->getEntity($ent_id); + $header = $message->header; - $charset = $header->charset; + $charset = $header->getParameter('charset'); $type0 = $header->type0; $type1 = $header->type1; $encoding = strtolower($header->encoding); $msg_url = 'read_body.php?' . $QUERY_STRING; + $msg_url = set_url_var($msg_url, 'ent_id', 0); - $body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id); + $body = mime_fetch_body($imapConnection, $passed_id, $ent_id); $body = decodeBody($body, $encoding); displayPageHeader($color, 'None'); @@ -45,7 +35,7 @@ _("Viewing a text attachment") . " - "; echo ''. _("View message") . ''; - $dwnld_url = '../src/download.php?'. $QUERY_STRING.'&absolute_dl=1'; + $dwnld_url = '../src/download.php?'. $QUERY_STRING.'&absolute_dl=true'; echo '
'. _("Download this as a file"). "

". @@ -53,16 +43,13 @@ "". "
". "
"; - - if ($type1 == 'html') { + if ($type1 == 'html' || $override_type1 == 'html') { $msg = sqimap_get_message($imapConnection, $passed_id, $mailbox); - $msg = $msg->getEntity($passed_ent_id); + $msg = $msg->getEntity($ent_id); $body = MagicHTML( $body, $passed_id, $msg ); } else { translateText($body, $wrap_at, $charset); } echo $body . "
"; - - sqimap_logout($imapConnection); ?>