From f7bc1576535239cae04090a6ece88b84d95e06a9 Mon Sep 17 00:00:00 2001 From: stekkel Date: Wed, 26 May 2004 00:02:37 +0000 Subject: [PATCH] Missed a sqimap_mailbox_expunge_dmn call. Thnx Seth Randall for spotting this. NOTE To squirrelmail developers. If you are bored, please integrate this in right_main.php. It's kind of a useless form handler which redirect to the original right_main.php. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7550 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/move_messages.php | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/move_messages.php b/src/move_messages.php index 4de2c232..b3d757df 100644 --- a/src/move_messages.php +++ b/src/move_messages.php @@ -16,6 +16,16 @@ * Path for SquirrelMail required files. * @ignore */ + + +/** + * FIX ME REMOVE ME FIX ME REMOVE ME I DON'T DESERVE TO EXIST + * + * Integrate this is a clean manner in right_main.php and rename right_main to + * messageslist or whatever + **/ + + define('SM_PATH','../'); /* SquirrelMail required files. */ @@ -120,11 +130,32 @@ sqgetGlobalVar('location', $location, SQ_POST); sqgetGlobalVar('bypass_trash', $bypass_trash, SQ_POST); sqgetGlobalVar('dmn', $is_dmn, SQ_POST); + + /* end of get globals */ $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $mbx_response=sqimap_mailbox_select($imapConnection, $mailbox); + +global $allow_thread_sort, $auto_expunge; + +if ($allow_thread_sort && getPref($data_dir, $username, "thread_$mailbox",0)) { + $aMailbox['SORT_METHOD'] = 'THREAD'; +} else if ($allow_server_sort) { + $aMailbox['SORT_METHOD'] = 'SERVER'; +} else { + $aMailbox['SORT_METHOD'] = 'SQUIRREL'; +} +sqgetGlobalVar('aLastSelectedMailbox',$aMailbox,SQ_SESSION); +sqgetGlobalVar('server_sort_array', $server_sort_array, SQ_SESSION); +$aMailbox['UIDSET'] = $server_sort_array; +$aMailbox['SORT'] = $sort; +$aMailbox['NAME'] = $mailbox; +$aMailbox['EXISTS'] = $mbx_response['EXISTS']; +$aMailbox['AUTO_EXPUNGE'] = $auto_expunge; +$aMailbox['MSG_HEADERS'] = $msgs; + $location = set_url_var($location,'composenew',0,false); $location = set_url_var($location,'composesession',0,false); $location = set_url_var($location,'session',0,false); @@ -204,7 +235,7 @@ if(isset($expungeButton)) { if ( $num_ids > 0 ) { if ( $is_dmn && $num_ids == 1 ) { sqimap_msgs_list_move($imapConnection,$id[0],$targetMailbox); - $num_ids = sqimap_mailbox_expunge_dmn($id[0]); + $num_ids = sqimap_mailbox_expunge_dmn($imapConnection,$aMailbox, $id[0]); } else { sqimap_msgs_list_move($imapConnection,$id,$targetMailbox); if ($auto_expunge) { -- 2.25.1