From: pdontthink Date: Sun, 22 May 2022 17:42:51 +0000 (+0000) Subject: Fix: When "Return To Message List After Move" is off, deleting message from message... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=43ecfa0484814aa98a9c6d09dec7d4631045cbb4;p=squirrelmail.git Fix: When "Return To Message List After Move" is off, deleting message from message view screen was broken (#2863) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14951 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/src/read_body.php b/src/read_body.php index aeff2e7e..041591b6 100644 --- a/src/read_body.php +++ b/src/read_body.php @@ -653,6 +653,8 @@ function formatMenubar($aMailbox, $passed_id, $passed_ent_id, $message, $oTemplate->assign('move_delete_form_action', $base_uri.'src/read_body.php'); $oTemplate->assign('delete_form_extra', addHidden('mailbox', $aMailbox['NAME'])."\n" . addHidden('msg[0]', $passed_id)."\n" . + // only need when $return_to_message_list_after_move is off + addHidden('passed_id', ($next >= 0 ? $next : $prev))."\n" . addHidden('startMessage', $startMessage)."\n" ); if (!(isset($passed_ent_id) && $passed_ent_id)) { $oTemplate->assign('can_be_moved', true); @@ -940,6 +942,13 @@ if ( sqgetGlobalVar('delete_id', $delete_id, SQ_GET) ) { handleMessageListForm($imapConnection,$aMailbox,$sButton='setDeleted', array($delete_id)); } +/** + * or delete button... why is handleMessageListForm (per above) conditional anway? + */ +if ( sqgetGlobalVar('delete', $ignore, SQ_POST) ) { + $sError = handleMessageListForm($imapConnection,$aMailbox); +} + /** * or move button... why is handleMessageListForm (per above) conditional anway? */