X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fdownload.php;h=91f90cc4e0410acbb0650779ae4dae5e564a681a;hp=7c92975b79016db4216da3cd6333ce85675d742a;hb=fdcca8d3739774b3561e01e925fc0e337305c1ad;hpb=a037624df01cf9f452f19b93565107926b69d66c diff --git a/src/download.php b/src/download.php index 7c92975b..91f90cc4 100644 --- a/src/download.php +++ b/src/download.php @@ -13,8 +13,6 @@ include("../config/config.php"); if (!isset($strings_php)) include("../functions/strings.php"); - if (!isset($page_header_php)) - include("../functions/page_header.php"); if (!isset($imap_php)) include("../functions/imap.php"); if (!isset($mime_php)) @@ -27,6 +25,8 @@ function viewText($color, $body, $id, $entid, $mailbox, $type1, $wrap_at) { global $where, $what, $charset; global $startMessage; + + displayPageHeader($color, "None"); echo "
"; @@ -109,9 +109,9 @@ header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-type: application/octet-stream; name=\"$filename\""); if ($type1 == "plain") { - echo _("Subject") . ": " . decodeHeader(stripslashes($top_header->subject)) . "\n"; - echo " " . _("From") . ": " . decodeHeader(stripslashes($top_header->from)) . "\n"; - echo " " . _("To") . ": " . decodeHeader(stripslashes(getLineOfAddrs($top_header->to))) . "\n"; + echo _("Subject") . ": " . decodeHeader(sqStripSlashes($top_header->subject)) . "\n"; + echo " " . _("From") . ": " . decodeHeader(sqStripSlashes($top_header->from)) . "\n"; + echo " " . _("To") . ": " . decodeHeader(sqStripSlashes(getLineOfAddrs($top_header->to))) . "\n"; echo " " . _("Date") . ": " . getLongDateString($top_header->date) . "\n\n"; } echo trim($body); @@ -127,10 +127,12 @@ switch ($type0) { case "text": $body = decodeBody($body, $header->encoding); + include("../functions/page_header.php"); viewText($color, $body, $passed_id, $passed_ent_id, $mailbox, $type1, $wrap_at); break; case "message": $body = decodeBody($body, $header->encoding); + include("../functions/page_header.php"); viewText($color, $body, $passed_id, $passed_ent_id, $mailbox, $type1, $wrap_at); break; default: @@ -142,5 +144,6 @@ } } + sqimap_mailbox_close($imapConnection); sqimap_logout($imapConnection); ?>