Missed a sqimap_mailbox_expunge_dmn call. Thnx Seth Randall for spotting
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 May 2004 00:02:37 +0000 (00:02 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 May 2004 00:02:37 +0000 (00:02 +0000)
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

index 4de2c2322ff6aba729af812d1468ddfb46c99476..b3d757dff70b8ed903d5cb763c5df819a7e52434 100644 (file)
  * 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) {