Fixed message highlighting
authorindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 24 Apr 2003 18:30:15 +0000 (18:30 +0000)
committerindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 24 Apr 2003 18:30:15 +0000 (18:30 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4811 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
functions/mailbox_display.php

index 0de552cb4c16d15f6f209844d3dccd66a4d24560..3ff53d36a54354a26c8248b4f6c55a080122073b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,8 @@ Version 1.5.0 -- CVS
   - Added mailto: support for Windows clients.  See
     contrib/squirrelmail.mailto.reg
   - Added lowsrc to the list of attributes to be removed.
+  - Fixed message highlighting for To, CC and From and
+    for RFC1522 headers (bug #719564)
 
 
 **************************************
index 6a1fac40057b3807268afa49836d3ef183fcabd9..5c9ab721b28c039bb06dc557aee13725370be07e 100644 (file)
@@ -93,8 +93,8 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox,
         }
     }
 
-    $subject_full = decodeHeader($msg['SUBJECT']);
-    $subject = processSubject($subject_full, $indent_array[$msg['ID']]);
+    $msg['SUBJECT'] = decodeHeader($msg['SUBJECT']);
+    $subject = processSubject($msg['SUBJECT'], $indent_array[$msg['ID']]);
 
     echo html_tag( 'tr','','','','VALIGN="top"') . "\n";
 
@@ -145,6 +145,8 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox,
                     case('TO'):
                     case('TO_CC'):
                         foreach ($msg['TO'] 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'];
@@ -156,6 +158,8 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox,
                         }
                     case('CC'):
                         foreach ($msg['CC'] 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'];
@@ -165,6 +169,8 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox,
                         break;
                     case('FROM'):
                         foreach ($msg['FROM'] 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'];
@@ -227,10 +233,10 @@ function printMessageInfo($imapConnection, $t, $not_last=true, $key, $mailbox,
                         .  '&amp;passed_id='. $msg["ID"]
                         .  '&amp;startMessage='.$start_msg.$searchstr.'"';
                 $td_str .= ' ' .concat_hook_function('subject_link'); 
-                if ($subject != $subject_full) {
+                if ($subject != $msg['SUBJECT']) {
                     $title = get_html_translation_table(HTML_SPECIALCHARS);
                     $title = array_flip($title);
-                    $title = strtr($subject_full, $title);
+                    $title = strtr($msg['SUBJECT'], $title);
                     $title = str_replace('"', "''", $title);
                     $td_str .= " title=\"$title\"";
                 }