From: Seth E. R. <ind...@us...> - 2003-04-06 00:50:27
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory sc8-pr-cvs1:/tmp/cvs-serv23060 Modified Files: mailbox_display.php Log Message: Fix for broken highlighting. Will start rewriting it later. Index: mailbox_display.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/mailbox_display.php,v retrieving revision 1.321 retrieving revision 1.322 diff -u -w -r1.321 -r1.322 --- mailbox_display.php 27 Mar 2003 16:47:38 -0000 1.321 +++ mailbox_display.php 6 Apr 2003 00:50:24 -0000 1.322 @@ -141,7 +141,9 @@ if (trim($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') { + switch($match_type) { + case('TO'): + case('TO_CC'): foreach ($msg['TO'] as $address) { if (strstr('^^' . strtolower($address[0]), $high_val) || strstr('^^' . strtolower($address[1]), $high_val)) { @@ -149,6 +151,10 @@ continue; } } + if($match_type != 'TO_CC') { + break; + } + case('CC'): foreach ($msg['CC'] as $address) { if( strstr('^^' . strtolower($address[0]), $high_val) || strstr('^^' . strtolower($address[1]), $high_val)) { @@ -156,11 +162,22 @@ continue; } } - } else { + break; + case('FROM'): + foreach ($msg['FROM'] as $address) { + if( strstr('^^' . strtolower($address[0]), $high_val) || + strstr('^^' . strtolower($address[1]), $high_val)) { + $hlt_color = $message_highlight_list_part['color']; + continue; + } + } + break; + default: if (strstr('^^' . strtolower($msg[$match_type]), $high_val)) { $hlt_color = $message_highlight_list_part['color']; continue; } + break; } } } |