Moving HTML out of strings and updating some tags to XHTML
[squirrelmail.git] / functions / mailbox_display.php
index 7e43bdf1112f427389e99b6a4d16fef30df9aa50..107d2d968f0e2a8c8d662b7808b5838e54754359 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 = '';
@@ -602,7 +598,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
                 $msgs = getThreadMessages($imapConnection, $start_msg, $show_num, $num_msgs);
                 if ($msgs === false) {
                     echo '<b><small><center><font color=red>' .
-                         _("Thread sorting is not supported by your IMAP server.") . "<br />" .
+                         _("Thread sorting is not supported by your IMAP server.") . '<br />' .
                         _("Please report this to the system administrator.").
                          '</center></small></b>';
                     $thread_sort_messages = 0;
@@ -617,7 +613,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
                                               $num_msgs, $sort, $mbxresponse);
                 if ($msgs === false) {
                     echo '<b><small><center><font color=red>' .
-                         _( "Server-side sorting is not supported by your IMAP server.") . "<br />" .
+                         _( "Server-side sorting is not supported by your IMAP server.") . '<br />' .
                         _("Please report this to the system administrator.").
                          '</center></small></b>';
                     $sort = $server_sort_order;
@@ -930,12 +926,7 @@ function mail_message_listing_beginning ($imapConnection,
           <td>
             <table bgcolor="<?php echo $color[4]; ?>" border="0" width="100%" cellpadding="1"  cellspacing="0">
               <tr>
-                <td align="left"><small>
-                   <?php
-                       echo $paginator; 
-                       echo $thread_link_str; 
-                   ?>
-               </small></td>
+                <td align="left"><small><?php echo $paginator . $thread_link_str; ?></small></td>
                 <td align="center"></td>
                 <td align="right"><small><?php echo $msg_cnt_str; ?></small></td>
               </tr>
@@ -1136,7 +1127,7 @@ function ShowSortButton($sort, $mailbox, $Down, $Up ) {
          . '&amp;startMessage=1&amp;mailbox=' . urlencode($mailbox)
          . '"><img src="../images/' . $img
          . '" border="0" width="12" height="10" alt="sort" title="'
-         . _("Click here to change the sorting of the message list") .'"></a>';
+         . _("Click here to change the sorting of the message list") .' /"></a>';
 }
 
 /**
@@ -1160,7 +1151,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"
@@ -1364,7 +1355,7 @@ function get_paginator_str($box, $start_msg, $end_msg, $num_msgs,
          * I am leaving this debug code here, commented out, because
          * it is a really nice way to see what the above code is doing.
          * echo "qts =  $q1_pgs/$q2_pgs/$q3_pgs/$q4_pgs = "
-         *    . ($q1_pgs + $q2_pgs + $q3_pgs + $q4_pgs) . '<br>';
+         *    . ($q1_pgs + $q2_pgs + $q3_pgs + $q4_pgs) . '<br />';
          */
 
         /* Print out the page links from the compute page quarters. */