Finally, a fix for delete_move_next with thread sort. I _think_ this should do the...
authortassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 4 Sep 2003 19:02:39 +0000 (19:02 +0000)
committertassium <tassium@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 4 Sep 2003 19:02:39 +0000 (19:02 +0000)
$thread_sort_messages was being checked, but it was always unset since it is declared in mailbox_display.php.  Once you're in the message view, that's gone.  So grab the value of thread_sort_messages from prefs, defaulting to 0 (no) if there's no pref set.

PLEASE TEST THIS - It "works for me", but that's always the case, isn't it?

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5622 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/delete_move_next/setup.php

index da52c45650d30c607ae2dfbda9a434336e42f416..21376a999fcd8950795c6f0e909cb794af5f5716 100644 (file)
@@ -34,6 +34,12 @@ function fix_sort_array () {
     global $username, $data_dir, $allow_server_sort, $allow_thread_sort,
     $thread_sort_messages, 
     $mailbox, $imapConnection, $sort, $uid_support, $mbx_response;
     global $username, $data_dir, $allow_server_sort, $allow_thread_sort,
     $thread_sort_messages, 
     $mailbox, $imapConnection, $sort, $uid_support, $mbx_response;
+    
+    // Got to grab this out of prefs, since it isn't saved from mailbox_view.php
+    if ($allow_thread_sort) {
+        $thread_sort_messages = getPref($data_dir, $username, "thread_$mailbox",0); 
+    }
+    
     switch (true) {
       case ($allow_thread_sort && $thread_sort_messages):
           $server_sort_array = get_thread_sort($imapConnection);
     switch (true) {
       case ($allow_thread_sort && $thread_sort_messages):
           $server_sort_array = get_thread_sort($imapConnection);