Nuke obsolete function general_info
[squirrelmail.git] / src / right_main.php
index 11268479f4b9e8bd22bf239a9ebf856867c58f7b..01d7634c428b410543a59abc12eaf0e5b3e0f7e3 100644 (file)
@@ -47,26 +47,6 @@ if (isset($newsort) && $newsort != $sort) {
     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, */
@@ -86,11 +66,32 @@ if ($imap_server_type == 'uw' && (strstr($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);