From 7058a2a9da7b7e141848fd92c15f1ab3f47b8bbb Mon Sep 17 00:00:00 2001 From: philippe_mingo Date: Mon, 11 Feb 2002 20:12:48 +0000 Subject: [PATCH] Bugfix in draft folders git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2420 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 16 ++++++++-------- src/delete_message.php | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/compose.php b/src/compose.php index e0b50bbd..8effe774 100644 --- a/src/compose.php +++ b/src/compose.php @@ -39,8 +39,8 @@ if (isset($draft)) { if (! isset($reply_id)) { $reply_id = 0; } - if (! isset($MDN)) { - $MDN = 'False'; + if (! isset($MDN)) { + $MDN = 'False'; } if (!saveMessageAsDraft($send_to, $send_to_cc, $send_to_bcc, $subject, $body, $reply_id, $MDN)) { showInputForm(); @@ -49,10 +49,10 @@ if (isset($draft)) { $draft_message = _("Draft Email Saved"); /* If this is a resumed draft, then delete the original */ if(isset($delete_draft)) { - Header("Location: delete_message.php?mailbox=$draft_folder". + Header("Location: delete_message.php?mailbox=" . urlencode($draft_folder) . "&message=$delete_draft&sort=$sort&startMessage=1&saved_draft=yes"); exit(); - } + } else { if ($compose_new_win == '1') { Header("Location: compose.php?saved_draft=yes"); @@ -80,13 +80,13 @@ if (isset($send)) { } /* * Set $default_charset to correspond with the user's selection - * of language interface. + * of language interface. */ set_my_charset(); /* * This is to change all newlines to \n - * We'll change them to \r\n later (in the sendMessage function) + * We'll change them to \r\n later (in the sendMessage function) */ $body = str_replace("\r\n", "\n", $body); $body = str_replace("\r", "\n", $body); @@ -95,7 +95,7 @@ if (isset($send)) { * Rewrap $body so that no line is bigger than $editor_size * This should only really kick in the sqWordWrap function * if the browser doesn't support "HARD" as the wrap type - * Or, in Opera's case, something goes wrong. + * Or, in Opera's case, something goes wrong. */ $body = explode("\n", $body); $newBody = ''; @@ -127,7 +127,7 @@ if (isset($send)) { exit(); } if ( isset($delete_draft)) { - Header("Location: delete_message.php?mailbox=$draft_folder". + Header("Location: delete_message.php?mailbox=" . urlencode( $draft_folder ). "&message=$delete_draft&sort=$sort&startMessage=1&mail_sent=yes"); exit(); } diff --git a/src/delete_message.php b/src/delete_message.php index 966fc548..3079368d 100644 --- a/src/delete_message.php +++ b/src/delete_message.php @@ -32,6 +32,7 @@ if (!isset($mail_sent)) { } $location = get_location(); + if (isset($where) && isset($what)) { header("Location: $location/search.php?where=" . urlencode($where) . '&what=' . urlencode($what) . '&mailbox=' . urlencode($mailbox)); -- 2.25.1