X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fdownload.php;h=2ee84adf250f8dd10bbf6daa77b4e6f830958365;hp=37cb370fdf76e819ed46b5d8d47273388428518b;hb=53f5d72eb2cf9b453360c36e51cb3e8bba8a64ec;hpb=2a0372ff98b6da79ebb4798f2790c5ab79602911 diff --git a/src/download.php b/src/download.php index 37cb370f..2ee84adf 100644 --- a/src/download.php +++ b/src/download.php @@ -1,23 +1,39 @@
"; echo "
"; @@ -48,9 +64,13 @@ echo "
"; echo "
"; - if ($type1 != "html") + if ($type1 == 'html') { + $body = MagicHTML( $body, $id ); + } else { translateText($body, $wrap_at, $charset); + } + flush(); echo $body; echo "
"; @@ -110,7 +130,6 @@ if (isset($absolute_dl) && $absolute_dl == "true") { switch($type0) { case "text": - set_up_language(getPref($data_dir, $username, "language")); DumpHeaders($type0, $type1, $filename, 1); $body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id); $body = decodeBody($body, $header->encoding); @@ -144,7 +163,6 @@ if ($type1 == "plain" || $type1 == "html") { $body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id); $body = decodeBody($body, $header->encoding); - include("../functions/page_header.php"); viewText($color, $body, $passed_id, $passed_ent_id, $mailbox, $type1, $wrap_at); } else { DumpHeaders($type0, $type1, $filename, 0); @@ -156,7 +174,6 @@ case "message": $body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id); $body = decodeBody($body, $header->encoding); - include("../functions/page_header.php"); viewText($color, $body, $passed_id, $passed_ent_id, $mailbox, $type1, $wrap_at); break; default: