After sending the message, check $mailbox. If it's "All Folders", we got to compose...
authortassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 6 Jan 2003 15:52:50 +0000 (15:52 +0000)
committertassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 6 Jan 2003 15:52:50 +0000 (15:52 +0000)
Closes #662346.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4386 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index d97a1048359eaa43da05484a38229c6be8fbccf3..6b6041323b9e56bdc8c8573eac56692528bf18f9 100644 (file)
@@ -219,7 +219,6 @@ if (sqsession_is_registered('session_expired_post')) {
     if (!isset($mailbox)) {
         $mailbox = '';
     }
     if (!isset($mailbox)) {
         $mailbox = '';
     }
-
     if ($compose_new_win == '1') {
         compose_Header($color, $mailbox);
     } else {
     if ($compose_new_win == '1') {
         compose_Header($color, $mailbox);
     } else {
@@ -298,6 +297,10 @@ if ($send) {
         $AttachFailure = saveAttachedFiles($session);
     }
     if (checkInput(false) && !isset($AttachFailure)) {
         $AttachFailure = saveAttachedFiles($session);
     }
     if (checkInput(false) && !isset($AttachFailure)) {
+               if ($mailbox == "All Folders") {
+                       /* We entered compose via the search results page */
+                       $mailbox="INBOX"; /* Send 'em to INBOX, that's safe enough */
+               }
         $urlMailbox = urlencode (trim($mailbox));
         if (! isset($passed_id)) {
             $passed_id = 0;
         $urlMailbox = urlencode (trim($mailbox));
         if (! isset($passed_id)) {
             $passed_id = 0;