From: ebullient Date: Mon, 29 Mar 2004 18:54:11 +0000 (+0000) Subject: correct Move & next when moving the first message in a mailbox X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=11026a30c4d3daa71dd09699f802fb6c1198a662;p=squirrelmail.git correct Move & next when moving the first message in a mailbox git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@6952 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/move_messages.php b/src/move_messages.php index 6e73b175..95b3a79c 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -117,6 +117,7 @@ sqgetGlobalVar('markUnflagged', $markUnflagged, SQ_POST); sqgetGlobalVar('attache', $attache, SQ_POST); sqgetGlobalVar('location', $location, SQ_POST); sqgetGlobalVar('bypass_trash', $bypass_trash, SQ_POST); +sqgetGlobalVar('dmn', $is_dmn, SQ_POST); /* end of get globals */ @@ -214,12 +215,18 @@ if(isset($expungeButton)) { } } else { // Move messages - if (count($id)) { - sqimap_msgs_list_move($imapConnection,$id,$targetMailbox); - if ($auto_expunge) { - $cnt = sqimap_mailbox_expunge($imapConnection, $mailbox, true); + $num_ids = count($id); + if ( $num_ids > 0 ) { + if ( $is_dmn && count($id) == 1 ) { + sqimap_msgs_list_move($imapConnection,$id[0],$targetMailbox); + $cnt = sqimap_mailbox_expunge_dmn($id[0]); } else { - $cnt = 0; + sqimap_msgs_list_move($imapConnection,$id,$targetMailbox); + if ($auto_expunge) { + $cnt = sqimap_mailbox_expunge($imapConnection, $mailbox, true); + } else { + $cnt = 0; + } } if (($startMessage+$cnt-1) >= $mbx_response['EXISTS']) { diff --git a/src/read_body.php b/src/read_body.php index 81cab1c3..54ae40ea 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -694,6 +694,7 @@ function formatMenubar($mailbox, $passed_id, $passed_ent_id, $message, $mbx_resp $menu_row .= '
'. ''. + ''. ''. ''._("Move to:") . '