From: ebullient Date: Fri, 5 Mar 2004 18:59:13 +0000 (+0000) Subject: Changed so that both move paths (with and without a next) use move_messages X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1c13663ffabc6999b47b77758f8f8562d50396ef;p=squirrelmail.git Changed so that both move paths (with and without a next) use move_messages to move the message folder. Cleaner that way - keeps more of the move code in the same place. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6750 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/read_body.php b/src/read_body.php index 96426d34..a4588362 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -675,20 +675,19 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp // Add top move link $menu_row .= ''; if ( !(isset($passed_ent_id) && $passed_ent_id) ) { - // If we have a next message, move, and then go to next. - // Otherwise, use move_messages to move, and then return to index. $current_box = 'mailbox='.$mailbox.'&sort='.$sort.'&startMessage='.$startMessage; - $action = $base_uri; + + // Set subsequent location based on whether or not there is a 'next' message. if ( isset($next) && $next >= 0 ) { - $action .= 'src/read_body.php?passed_id='.$next.'&'; + $location = $base_uri . 'src/read_body.php?passed_id='.$next.'&'; } else { - $action .= 'src/move_messages.php?'; + $location = $base_uri . 'src/right_main.php?'; } - $action .= $current_box; - $menu_row .= '
'. + $menu_row .= ''. ''. + ''. ''._("Move to:") . ' '; - // If we'll be using move_messages.php, also add location to form - if ( !isset($next) || $next < 0 ) { - $menu_row .= ''; - } - $menu_row .= getButton('SUBMIT', 'moveButton',_("Move")) . "\n" . ''; } $menu_row .= ''; @@ -814,30 +808,6 @@ if ( sqgetGlobalVar('delete_id', $delete_id, SQ_GET) ) { sqimap_mailbox_expunge_dmn($delete_id); } -/** - * Process Move from delete-move-next - * but only if move_id and target_mailbox were set - */ -if ( sqgetGlobalVar('moveButton', $moveButton, SQ_POST) && - sqgetGlobalVar('msg', $msg, SQ_POST) && - sqgetGlobalVar('targetMailbox', $targetMailbox, SQ_POST) && - is_array($msg) && !empty($msg) ) { - - $move_id = $msg[0]; - - // Move message - sqimap_messages_copy($imapConnection, $move_id, $move_id, $targetMailbox); - sqimap_messages_flag($imapConnection, $move_id, $move_id, 'Deleted', true); - - sqimap_mailbox_expunge_dmn($move_id); - - if ($targetMailbox != $lastTargetMailbox) { - $lastTargetMailbox = $targetMailbox; - sqsession_register('lastTargetMailbox' , $lastTargetMailbox); - } -} - - /** * $message contains all information about the message * including header and body