From: jervfors Date: Sat, 16 Apr 2005 20:17:37 +0000 (+0000) Subject: Fix for highlighting. highlightMessage() didn't get the right input. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=235413514879640558b885d2335e98691abeb70f;p=squirrelmail.git Fix for highlighting. highlightMessage() didn't get the right input. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9319 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index a35cbccc..bb203342 100644 --- a/functions/mailbox_display.php +++ b/functions/mailbox_display.php @@ -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