summaryrefslogtreecommitdiff
path: root/program
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:53:22 +0200
commit3d8eef31c2b4c52159ea1791b08da8db008ea12e (patch)
tree7830e1b987c1fb330b8d8b2aab4a0fc34e974916 /program
parentaf7264ab2b067f100342e68a25053ae8fb6bb5fa (diff)
Fix bug in last commit which broke searching
Diffstat (limited to 'program')
-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 72c09462b..f20694272 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -106,7 +106,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)
@@ -124,10 +125,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);