X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;ds=sidebyside;f=functions%2Fmailbox_display.php;h=afdbdb5c2201678ec430761fa22617b0709f20c9;hb=9d157cec2821461fe4d348a47e2312db5e84c052;hp=78fe5453b5f3e40be3f02ae80fe125b9f0e073a4;hpb=349ca9f7359a2d69a9a99e295cce00e8476e016f;p=squirrelmail.git diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 78fe5453..afdbdb5c 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -13,6 +13,7 @@ function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $startMessage) { global $color, $msgs, $msort; global $sent_folder; + global $message_highlight_list; $msg = $msgs[$key]; @@ -25,12 +26,21 @@ if ($msg["FLAG_SEEN"] == false) { $bold = ""; $bold_end = ""; } if ($mailbox == $sent_folder) { $italic = ""; $italic_end = ""; } - echo " \n"; - echo " $italic$bold$flag$senderName$flag_end$bold_end$italic_end\n"; - echo "
$bold$flag".$msg["DATE_STRING"]."$flag_end$bold_end
\n"; - if ($msg["FLAG_ANSWERED"] == true) echo " A"; - else echo "  "; - echo " $bold$flag$subject$flag_end$bold_end\n"; + for ($i=0; $i < count($message_highlight_list); $i++) { + if (eregi($message_highlight_list[$i]["value"],$msg["FROM"])) { + $hlt_color = $message_highlight_list[$i]["color"]; + continue; + } + } + if (!$hlt_color) + $hlt_color = $color[4]; + + echo " \n"; + echo " $italic$bold$flag$senderName$flag_end$bold_end$italic_end\n"; + echo "
$bold$flag".$msg["DATE_STRING"]."$flag_end$bold_end
\n"; + if ($msg["FLAG_ANSWERED"] == true) echo " A"; + else echo "  "; + echo " $bold$flag$subject$flag_end$bold_end\n"; echo "\n"; } @@ -41,6 +51,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $numMessages, $startMessage, $sort, $color,$show_num, $use_cache) { global $msgs, $msort; global $sent_folder; + global $message_highlight_list; if (!$use_cache) { if ($numMessages >= 1) { @@ -111,7 +122,7 @@ ** 2 = Name (up) ** 3 = Name (dn) **/ - + session_unregister("msgs"); if (($sort == 0) || ($sort == 1)) $msort = array_cleave ($msgs, "TIME_STAMP"); if (($sort == 2) || ($sort == 3)) @@ -127,6 +138,7 @@ session_register("msort"); } displayMessageArray($imapConnection, $numMessages, $startMessage, $msgs, $msort, $mailbox, $sort, $color,$show_num); + session_register("msgs"); } // generic function to convert the msgs array into an HTML table