summaryrefslogtreecommitdiff
path: root/program/steps/mail/list.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-11-13 10:30:06 +0000
committeralecpl <alec@alec.pl>2008-11-13 10:30:06 +0000
commite538b3dc7d740c5a9213ef352437f249be856d3a (patch)
tree5ff0bf1bf9b0a336ad5da3e29d11e4e3305f6558 /program/steps/mail/list.inc
parent6fa87f3fa5579da0935dc6ee29af77aea19ad872 (diff)
- Added message status filter + fixes for r2046 (searching with SORT)
Diffstat (limited to 'program/steps/mail/list.inc')
-rw-r--r--program/steps/mail/list.inc13
1 files changed, 11 insertions, 2 deletions
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index a868f9cc6..2078262eb 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -41,6 +41,17 @@ else
$mbox_name = $IMAP->get_mailbox_name();
+// initialize searching result if search_filter is used
+if ($_SESSION['search_filter'] && $_SESSION['search_filter'] != 'ALL')
+{
+ $search_request = md5($mbox_name.$_SESSION['search_filter']);
+
+ $IMAP->search($mbox_name, $_SESSION['search_filter'], RCMAIL_CHARSET, $sort_col);
+ $_SESSION['search'][$search_request] = $IMAP->get_search_set();
+ $OUTPUT->set_env('search_request', $search_request);
+}
+
+
// fetch message headers
if ($IMAP->messagecount($mbox_name, 'ALL', !empty($_REQUEST['_refresh'])))
$a_headers = $IMAP->list_headers($mbox_name, NULL, $sort_col, $sort_order);
@@ -55,8 +66,6 @@ $OUTPUT->set_env('pagecount', $pages);
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text($count));
$OUTPUT->command('set_mailboxname', rcmail_get_mailbox_name_text());
-
-
// add message rows
if (isset($a_headers) && count($a_headers))
rcmail_js_message_list($a_headers);