From c083ce9a45c57cfe0bb449606cf5a63fc3c9506d Mon Sep 17 00:00:00 2001 From: stekkel Date: Sun, 6 Oct 2002 13:08:24 +0000 Subject: [PATCH] rg=0 fix & put exit commands after the redirects git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3764 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/move_messages.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/move_messages.php b/src/move_messages.php index d43c3b10..755f0102 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -118,7 +118,6 @@ $key = $_COOKIE['key']; $onetimepad = $_SESSION['onetimepad']; $base_uri = $_SESSION['base_uri']; $delimiter = $_SESSION['delimiter']; - if (isset($_GET['mailbox'])) { $mailbox = $_GET['mailbox']; } @@ -159,6 +158,10 @@ if (isset($_POST['attache'])) { $attache = $_POST['attache']; } +if (isset($_POST['location'])) { + $location = $_POST['location']; +} + /* end of get globals */ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); @@ -188,6 +191,7 @@ if(isset($expungeButton)) { } } header("Location: $location"); + exit; } elseif(isset($undeleteButton)) { // undelete messages if user isn't using move_to_trash or auto_expunge if (is_array($msg) == 1) { @@ -204,6 +208,7 @@ if(isset($expungeButton)) { $i++; } header ("Location: $location"); + exit; } else { displayPageHeader($color, $mailbox); error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color); @@ -240,10 +245,12 @@ if(isset($expungeButton)) { $composesession = attachSelectedMessages($msg, $imapConnection); if ($compose_new_win) { header ("Location: $location&composenew=1&session=$composesession"); + exit; } else { $location = str_replace('search.php','compose.php',$location); $location = str_replace('right_main.php','compose.php',$location); header ("Location: $location&session=$composesession"); + exit; } } else { if (($startMessage+$cnt-1) >= $mbx_response['EXISTS']) { @@ -254,6 +261,7 @@ if(isset($expungeButton)) { } } header ("Location: $location"); + exit; } } else { displayPageHeader($color, $mailbox); @@ -289,7 +297,8 @@ if(isset($expungeButton)) { $location = set_url_var($location,'startMessage',1); } } - header ("Location: $location"); + header ("Location: $location"); + exit; } else { displayPageHeader($color, $mailbox); error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color); @@ -297,6 +306,5 @@ if(isset($expungeButton)) { } // Log out this session sqimap_logout($imapConnection); - ?> -- 2.25.1