From c0d04f9753371080831e9e79f41d7b4756df83ab Mon Sep 17 00:00:00 2001 From: indiri69 Date: Wed, 9 Oct 2002 16:59:56 +0000 Subject: [PATCH] More code cleanups git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3824 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index 83097cad..5caf500b 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -121,17 +121,16 @@ function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, if (sizeof($message_highlight_list)){ foreach ($message_highlight_list as $message_highlight_list_part) { if (trim($message_highlight_list_part['value']) != '') { - if ($message_highlight_list_part['match_type'] == 'to_cc') { - if (strstr('^^' . strtolower($msg['TO']), - strtolower($message_highlight_list_part['value'])) - || strstr('^^'.strtolower($msg['CC']), - strtolower($message_highlight_list_part['value']))) { + $high_val = strtolower($message_highlight_list_part['value']); + $match_type = strtoupper($message_highlight_list_part['match_type']); + if ($match_type == 'TO_CC') { + if (strstr('^^' . strtolower($msg['TO']), $high_val) || + strstr('^^' . strtolower($msg['CC']), $high_val)) { $hlt_color = $message_highlight_list_part['color']; continue; } } else { - if (strstr('^^' . strtolower($msg[strtoupper($message_highlight_list_part['match_type'])]), - strtolower($message_highlight_list_part['value']))) { + if (strstr('^^' . strtolower($msg[$match_type]), $high_val)) { $hlt_color = $message_highlight_list_part['color']; continue; } @@ -623,7 +622,7 @@ function displayMessageArray($imapConnection, $num_msgs, $start_msg, $k++; } while (isset ($key) && ($k < $i)); printMessageInfo($imapConnection, $t, $i, $key, $mailbox, - $real_startMessage, $where, $what); + $real_startMessage, $where, $what); } else { $i = $start_msg; reset($msort); -- 2.25.1