- if (strstr('^^' . strtolower($msg[$match_type]), $high_val)) {
- $hlt_color = $message_highlight_list_part['color'];
- continue;
+ $match = array($match_type);
+ }
+ foreach($match as $match_type) {
+ switch($match_type) {
+ case('TO'):
+ case('CC'):
+ case('FROM'):
+ foreach ($msg[$match_type] as $address) {
+ $address[0] = decodeHeader($address[0]);
+ $address[1] = decodeHeader($address[1]);
+ if (strstr('^^' . strtolower($address[0]), $high_val) ||
+ strstr('^^' . strtolower($address[1]), $high_val)) {
+ $hlt_color = $message_highlight_list_part['color'];
+ break 4;
+ }
+ }
+ break;
+ default:
+ if (strstr('^^' . strtolower($msg[$match_type]), $high_val)) {
+ $hlt_color = $message_highlight_list_part['color'];
+ break 3;
+ }
+ break;