X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fdownload.php;h=f8a334d180b98465c4ba92fd0e356e109034d43a;hb=d30d79f24098bb0e09a68467539912208434ac2f;hp=b89fced173a99c58dd6fdcfa9de9cc51b4ab6279;hpb=11307a4c707a22ef7dc2530b0e33c2afa5329e58;p=squirrelmail.git diff --git a/src/download.php b/src/download.php index b89fced1..f8a334d1 100644 --- a/src/download.php +++ b/src/download.php @@ -1,11 +1,16 @@
"; - echo "
Viewing a plain text attachment
"; + echo "
"; + echo _("Viewing a plain text attachment"); + echo "
"; echo "
"; $urlmailbox = urlencode($mailbox); - echo "
Download this as a file


"; + echo "
"; + echo _("Download this as a file"); + echo "


"; if ($type1 == "html") echo $body; else @@ -26,12 +35,12 @@ echo "
"; } - $imapConnection = loginToImapServer($username, $key, $imapServerAddress); - selectMailbox($imapConnection, $mailbox, $numMessages); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0); + sqimap_mailbox_select($imapConnection, $mailbox); // $message contains all information about the message // including header and body - $message = fetchMessage($imapConnection, $passed_id, $mailbox); + $message = sqimap_get_message($imapConnection, $passed_id, $mailbox); $type0 = $message["ENTITIES"][$passed_ent_id]["TYPE0"]; $type1 = $message["ENTITIES"][$passed_ent_id]["TYPE1"]; @@ -75,5 +84,5 @@ } } - fputs($imapConnection, "1 logout\n"); + sqimap_logout($imapConnection); ?>