summaryrefslogtreecommitdiff
path: root/program/steps/mail/search.inc
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-11 19:21:51 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-11 19:21:51 +0200
commit703be89e20dbbd5d9c66b0736824e258e526614d (patch)
treed99cfd15ed73054334d3f332fd4023e009a4688f /program/steps/mail/search.inc
parente0efd8f5dc9bcdb7559c71386aa3c91c1230e8d3 (diff)
Fix bug in last commit which broke searching
Diffstat (limited to 'program/steps/mail/search.inc')
-rw-r--r--program/steps/mail/search.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index b0d584100..670680959 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -103,7 +103,8 @@ if (!empty($subject)) {
$search_str .= sprintf(" %s {%d}\r\n%s", $sub, strlen($search), $search);
}
-$search_str = trim($search_str);
+$search_str = trim($search_str);
+$sort_column = rcmail_sort_column();
// execute IMAP search
if ($search_str)
@@ -121,10 +122,9 @@ $_SESSION['search_request'] = $search_request;
// Get the headers
-$result_h = $RCMAIL->storage->list_messages($mbox, 1, rcmail_sort_column(), rcmail_sort_order());
+$result_h = $RCMAIL->storage->list_messages($mbox, 1, $sort_column, rcmail_sort_order());
$count = $RCMAIL->storage->count($mbox, $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL');
-
// Make sure we got the headers
if (!empty($result_h)) {
rcmail_js_message_list($result_h);