Bugfix in draft folders
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 11 Feb 2002 20:12:48 +0000 (20:12 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 11 Feb 2002 20:12:48 +0000 (20:12 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2420 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php
src/delete_message.php

index e0b50bbd3e4bcc60129a0ec16693c9734722dc15..8effe7742bad906f1f77d607595c158815eea7d2 100644 (file)
@@ -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();
         }
index 966fc54838c6651300d7553a3bc5f37a501ec1cc..3079368d90f3eee2919d0e5049c47b7635e5ff14 100644 (file)
@@ -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));