setPref($data_dir, $username, 'sort', $newsort);
}
-/* decide if we are thread sorting or not */
-global $allow_thread_sort;
-if ($allow_thread_sort == TRUE) {
- if (isset($set_thread)) {
- if ($set_thread == 1) {
- setPref($data_dir, $username, 'thread_sort_messages', 1);
- $thread_sort_messages = '1';
- }
- elseif ($set_thread == 2) {
- setPref($data_dir, $username, 'thread_sort_messages', 0);
- $thread_sort_messages = '0';
- }
- }
- else {
- $thread_sort_messages = getPref($data_dir, $username, 'thread_sort_messages');
- }
-}
-else {
- $thread_sort_messages = 0;
-}
/* If the page has been loaded without a specific mailbox, */
substr($mailbox, 0, 1) == '/')) {
$mailbox = 'INBOX';
}
- global $color;
- if( isset($do_hook) && $do_hook ) {
- do_hook ("generic_header");
+/* decide if we are thread sorting or not */
+global $allow_thread_sort;
+if ($allow_thread_sort == TRUE) {
+ if (isset($set_thread)) {
+ if ($set_thread == 1) {
+ setPref($data_dir, $username, "thread_$mailbox", 1);
+ $thread_sort_messages = '1';
+ }
+ elseif ($set_thread == 2) {
+ setPref($data_dir, $username, "thread_$mailbox", 0);
+ $thread_sort_messages = '0';
+ }
}
+ else {
+ $thread_sort_messages = getPref($data_dir, $username, "thread_$mailbox");
+ }
+}
+else {
+ $thread_sort_messages = 0;
+}
+
+global $color;
+if( isset($do_hook) && $do_hook ) {
+ do_hook ("generic_header");
+}
sqimap_mailbox_select($imapConnection, $mailbox);