Fix for highlighting. highlightMessage() didn't get the right input.
authorjervfors <jervfors@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 16 Apr 2005 20:17:37 +0000 (20:17 +0000)
committerjervfors <jervfors@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 16 Apr 2005 20:17:37 +0000 (20:17 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9319 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mailbox_display.php

index a35cbcccbf39a96e97e2cacbc9a8982ebf72cc14..bb203342cca21c315fc691c8b3a5adb164a2dd68 100644 (file)
@@ -441,6 +441,22 @@ function prepareMessageList(&$aMailbox, $aProps) {
           default: break;
         }
     }
+    foreach ($aExtraColumns as $k) {
+        switch ($k) {
+          case SQM_COL_FROM:       $aCol[SQM_COL_FROM]       = 'from';         break;
+          case SQM_COL_DATE:       $aCol[SQM_COL_DATE]       = 'date';         break;
+          case SQM_COL_SUBJ:       $aCol[SQM_COL_SUBJ]       = 'subject';      break;
+          case SQM_COL_FLAGS:      $aCol[SQM_COL_FLAGS]      = 'FLAGS';        break;
+          case SQM_COL_SIZE:       $aCol[SQM_COL_SIZE]       = 'SIZE';         break;
+          case SQM_COL_PRIO:       $aCol[SQM_COL_PRIO]       = 'x-priority';   break;
+          case SQM_COL_ATTACHMENT: $aCol[SQM_COL_ATTACHMENT] = 'content-type'; break;
+          case SQM_COL_INT_DATE:   $aCol[SQM_COL_INT_DATE]   = 'INTERNALDATE'; break;
+          case SQM_COL_TO:         $aCol[SQM_COL_TO]         = 'to';           break;
+          case SQM_COL_CC:         $aCol[SQM_COL_CC]         = 'cc';           break;
+          case SQM_COL_BCC:        $aCol[SQM_COL_BCC]        = 'bcc';          break;
+          default: break;
+        }
+    }
     $aFormattedMessages = array();
 
 
@@ -589,9 +605,9 @@ function prepareMessageList(&$aMailbox, $aProps) {
             }
             /* columns which will not be displayed but should be inspected
                because the highlight list contains rules with those columns */
-            foreach ($aExtraColumns as $k) {
+            foreach ($aExtraColumns as $v) {
                 if ($highlight_list && !$bHighLight) {
-                     $bHighLight = highlightMessage($k, $value, $highlight_list,$aFormattedMessages[$iUid]);
+                    $bHighLight = highlightMessage($aCol[$v], $value, $highlight_list,$aFormattedMessages[$iUid]);
                 }
             }
             $aFormattedMessages[$iUid]['columns'] = $aColumns;
@@ -1328,4 +1344,4 @@ function attachSelectedMessages($imapConnection,$aMsgHeaders) {
     return $composesession;
 }
 
-?>
+?>
\ No newline at end of file