From 3667f4695cbb4c1360512115da0a9f3a40325124 Mon Sep 17 00:00:00 2001 From: indiri69 Date: Fri, 21 May 2004 15:26:38 +0000 Subject: [PATCH] Fix message highlighting for mailbox changes git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7510 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 17660ac2..66d80ed8 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -212,6 +212,7 @@ function printMessageInfo($t, $last=false, $msg, $mailbox, $searchstr = ''; } + $matches = array('TO' => 'sTo', 'CC' => 'sCc', 'FROM' => 'sFrom', 'SUBJECT' => 'sSubject'); if (is_array($message_highlight_list) && count($message_highlight_list)) { $sTo = parseAddress($sTo); $sCc = parseAddress($sCc); @@ -229,7 +230,7 @@ function printMessageInfo($t, $last=false, $msg, $mailbox, case('TO'): case('CC'): case('FROM'): - foreach ($msg[$match_type] as $address) { + foreach ($$matches[$match_type] as $address) { $address[0] = decodeHeader($address[0], true, false); $address[1] = decodeHeader($address[1], true, false); if (strstr('^^' . strtolower($address[0]), $high_val) || @@ -240,7 +241,7 @@ function printMessageInfo($t, $last=false, $msg, $mailbox, } break; default: - $headertest = strtolower(decodeHeader($msg[$match_type], true, false)); + $headertest = strtolower(decodeHeader($$matches[$match_type], true, false)); if (strstr('^^' . $headertest, $high_val)) { $hlt_color = $message_highlight_list_part['color']; break 3; -- 2.25.1