diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-03-19 22:36:24 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-03-19 22:36:24 +0000 |
| commit | 5ab9c6f623ea09cddc8c9729418f87df4f578e75 (patch) | |
| tree | 24e873f9a490a1b10c22c92059ce0bb45c763848 /roundcubemail/program/steps/mail/get.inc | |
| parent | 542100f52706cb2b433250d9d8d10c039b8becaa (diff) | |
Correctly parse message/rfc822; fixed html2text conversion; code cleanup
git-svn-id: https://svn.roundcube.net/trunk@511 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/get.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/get.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/mail/get.inc b/roundcubemail/program/steps/mail/get.inc index 521f47735..11688f125 100644 --- a/roundcubemail/program/steps/mail/get.inc +++ b/roundcubemail/program/steps/mail/get.inc @@ -59,16 +59,12 @@ else if ($pid = get_input_value('_part', RCUBE_INPUT_GET)) { $ctype_primary = strtolower($part->ctype_primary); $ctype_secondary = strtolower($part->ctype_secondary); - $mimetype = sprintf('%s/%s', $ctype_primary, $ctype_secondary); - $filename = $part->d_parameters['filename'] ? $part->d_parameters['filename'] : $part->ctype_parameters['name']; header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private", false); header("Content-Transfer-Encoding: binary"); - header(sprintf('Content-Disposition: attachment; filename="%s";', - $filename ? rcube_imap::decode_mime_string($filename) : "roundcube.$ctype_secondary")); // send download headers if ($_GET['_download']) @@ -110,6 +106,10 @@ else if ($pid = get_input_value('_part', RCUBE_INPUT_GET)) } else { + header(sprintf('Content-Disposition: %s; filename="%s";', + $part->disposition ? $part->disposition : 'attachment', + $part->filename ? $part->filename : "roundcube.$ctype_secondary")); + // turn off output buffering and print part content $IMAP->get_message_part($MESSAGE['UID'], $part->mime_id, $part->encoding, true); } |
