Specifically avoid using SEARCH CHARSET "US-ASCII" because it happens although it...
[squirrelmail.git] / functions / mailbox_display.php
index 7e43bdf1112f427389e99b6a4d16fef30df9aa50..c010ba8abc72de17bb5476b725a735a85b293406 100644 (file)
@@ -534,7 +534,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
                                 $start_msg, $sort, $color, $show_num,
                                 $use_cache, $mode='') {
     global $msgs, $msort, $auto_expunge, $thread_sort_messages,
-           $disable_server_sort, $server_sort_order;
+           $allow_server_sort, $server_sort_order;
 
     /*
      * For some reason, on PHP 4.3+, this being unset, and set in the session causes havoc
@@ -550,10 +550,6 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
         $msgs = array();
     }
 
-    if (!isset(disable_server_sort)) {
-        $disable_server_sort = false;
-    }
-
     //$start = microtime();
     /* If autoexpunge is turned on, then do it now. */
     $mbxresponse = sqimap_mailbox_select($imapConnection, $mailbox);
@@ -585,7 +581,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
 
         if ($thread_sort_messages == 1) {
             $mode = 'thread';
-        } elseif (sqimap_capabilty($imapConnection,'SORT') && !$disable_server_sort == 1) {
+        } elseif ($allow_server_sort == 1) {
             $mode = 'serversort';
         } else {
             $mode = '';
@@ -1160,7 +1156,7 @@ function get_selectall_link($start_msg, $sort, $mailbox) {
                 . "function " . $func_name . "() {\n"
                 . "  for (var i = 0; i < document." . $form_name . ".elements.length; i++) {\n"
                 . "    if(document." . $form_name . ".elements[i].type == 'checkbox' && "
-                . "document." . $form_name . ".elements[i].name != 'bypass_trash'){\n"
+                . "       document." . $form_name . ".elements[i].name.substring(0,3) == 'msg'){\n"
                 . "      document." . $form_name . ".elements[i].checked = "
                 . "        !(document." . $form_name . ".elements[i].checked);\n"
                 . "    }\n"