X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fmailbox_display.php;h=d0706aae41d238e8660f7b011c2a17752e05f115;hp=08909f478983760f322713d8761743ab0c08afeb;hb=673f935035f4872437d24a4ce4fabb305dad9696;hpb=4b920601138434546a98d0e3b2150fbc0a8c13b0 diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 08909f47..d0706aae 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -78,7 +78,7 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox, $subject = processSubject($msg['SUBJECT']); - echo html_tag( 'tr' ) . "\n"; + echo html_tag( 'tr','','','','VALIGN="top"') . "\n"; if (isset($msg['FLAG_FLAGGED']) && ($msg['FLAG_FLAGGED'] == true)) { $flag = ""; @@ -118,7 +118,7 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox, * AAAAH! Make my eyes stop bleeding! * Who wrote this?! */ - if (sizeof($message_highlight_list)){ + if (is_array($message_highlight_list) && count($message_highlight_list)){ foreach ($message_highlight_list as $message_highlight_list_part) { if (trim($message_highlight_list_part['value']) != '') { $high_val = strtolower($message_highlight_list_part['value']); @@ -142,7 +142,7 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox, if (!isset($hlt_color)) { $hlt_color = $color_string; } - $checked = ($checkall == 1) ? true : false; + $checked = ($checkall == 1) ? ' CHECKED' : ''; $col = 0; if (sizeof($index_order)) { foreach ($index_order as $index_order_part) { @@ -161,8 +161,12 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox, $hlt_color ); break; case 3: /* date */ + $date_string = $msg['DATE_STRING'] . ''; + if ($date_string == '') { + $date_string = _("Unknown date"); + } echo html_tag( 'td', - $bold . $flag . $fontstr . $msg['DATE_STRING'] . + $bold . $flag . $fontstr . $date_string . $fontstr_end . $flag_end . $bold_end, 'center', $hlt_color, @@ -451,12 +455,19 @@ function calc_msort($msgs, $sort) { * 4 = Subject (up) * 5 = Subject (dn) */ + if (($sort == 0) || ($sort == 1)) { - $msort = array_cleave ($msgs, 'TIME_STAMP'); + foreach ($msgs as $item) { + $msort[] = $item['TIME_STAMP']; + } } elseif (($sort == 2) || ($sort == 3)) { - $msort = array_cleave ($msgs, 'FROM-SORT'); + foreach ($msgs as $item) { + $msort[] = $item['FROM-SORT']; + } } elseif (($sort == 4) || ($sort == 5)) { - $msort = array_cleave ($msgs, 'SUBJECT-SORT'); + foreach ($msgs as $item) { + $msort[] = $item['SUBJECT-SORT']; + } } else { $msort = $msgs; } @@ -539,8 +550,7 @@ function fillMessageArray($imapConnection, $id, $count) { function displayMessageArray($imapConnection, $num_msgs, $start_msg, $msort, $mailbox, $sort, $color, $show_num, $where=0, $what=0) { - global $imapServerAddress, $use_mailbox_cache, - $index_order, $checkall, + global $imapServerAddress, $use_mailbox_cache, $index_order, $indent_array, $thread_sort_messages, $allow_server_sort, $server_sort_order, $PHP_SELF; @@ -1189,21 +1199,7 @@ function processSubject($subject) { function getMbxList($imapConnection) { global $lastTargetMailbox; echo '   '; }