From 7e1542241608ab7f4b5329703507c578d81bf813 Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 27 Aug 2009 09:22:34 +0000 Subject: - Fix Date sorting problem with Courier IMAP server (#1486065) --- program/lib/imap.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'program') diff --git a/program/lib/imap.inc b/program/lib/imap.inc index f06767570..ce778b2b7 100644 --- a/program/lib/imap.inc +++ b/program/lib/imap.inc @@ -988,7 +988,7 @@ function iil_C_FetchHeaderIndex(&$conn, $mailbox, $message_set, $index_field='', } if ($mode == 1) { - if (preg_match('/BODY\[HEADER\.FIELDS \((DATE|FROM|REPLY-TO|SENDER|TO|SUBJECT)\)\] (.*)/', $line, $matches)) { + if (preg_match('/BODY\[HEADER\.FIELDS \("?(DATE|FROM|REPLY-TO|SENDER|TO|SUBJECT)"?\)\] (.*)/', $line, $matches)) { $value = preg_replace(array('/^"*[a-z]+:/i', '/\s+$/sm'), array('', ''), $matches[2]); $value = trim($value); if ($index_field == 'DATE') { -- cgit v1.2.3