From: lkehresman Date: Mon, 16 Apr 2001 15:00:44 +0000 (+0000) Subject: added download enhancements to 1.1 tree X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=44f93f9848cedba907462c82b8f22e467838bb68;hp=6c1feae608b167bdc3a6d000df9fd2c87873b339 added download enhancements to 1.1 tree git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1233 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/download.php b/src/download.php index ee1b3da3..78d3948d 100644 --- a/src/download.php +++ b/src/download.php @@ -120,9 +120,9 @@ case "text": $body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id); $body = decodeBody($body, $header->encoding); + set_up_language(getPref($data_dir, $username, "language")); header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-type: application/octet-stream; name=\"$filename\""); - set_up_language(getPref($data_dir, $username, "language")); if ($type1 == "plain") { echo _("Subject") . ": " . decodeHeader($top_header->subject) . "\n"; echo " " . _("From") . ": " . decodeHeader($top_header->from) . "\n"; @@ -132,8 +132,8 @@ echo trim($body); break; default: - header("Content-Disposition: attachment; filename=\"$filename\""); - header("Content-type: application/octet-stream; name=\"$filename\""); + header("Content-Disposition: inline; filename=\"$filename\""); + header("Content-type: application/download; name=\"$filename\""); mime_print_body_lines ($imapConnection, $passed_id, $passed_ent_id, $header->encoding); break; } @@ -149,7 +149,7 @@ $body = mime_fetch_body($imapConnection, $passed_id, $passed_ent_id); $body = decodeBody($body, $header->encoding); header("Content-type: $type0/$type1; name=\"$filename\""); - header("Content-Disposition: attachment; filename=\"$filename\""); + header("Content-Disposition: inline; filename=\"$filename\""); echo $body; } break; @@ -161,7 +161,7 @@ break; default: header("Content-type: $type0/$type1; name=\"$filename\""); - header("Content-Disposition: attachment; filename=\"$filename\""); + header("Content-Disposition: inline; filename=\"$filename\""); mime_print_body_lines ($imapConnection, $passed_id, $passed_ent_id, $header->encoding); break; }