summaryrefslogtreecommitdiff
path: root/program/steps/mail/search.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/search.inc')
-rw-r--r--program/steps/mail/search.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index 5ce9fe6e2..b45cdc0de 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -114,6 +114,10 @@ if ($search_str) {
$RCMAIL->storage->search($mboxes, $search_str, $imap_charset, $sort_column);
}
+// Get the headers
+$result_h = $RCMAIL->storage->list_messages($mbox, 1, $sort_column, rcmail_sort_order());
+$count = $RCMAIL->storage->count($mbox, $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL');
+
// save search results in session
if (!is_array($_SESSION['search'])) {
$_SESSION['search'] = array();
@@ -125,10 +129,6 @@ if ($search_str) {
}
$_SESSION['search_request'] = $search_request;
-// Get the headers
-$result_h = $RCMAIL->storage->list_messages($mbox, 1, $sort_column, rcmail_sort_order());
-$count = $RCMAIL->storage->count($mbox, $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL');
-
// Add 'folder' column to list
if ($_SESSION['search'][1]->multi) {
$a_show_cols = $_SESSION['list_attrib']['columns'] ? $_SESSION['list_attrib']['columns'] : (array)$CONFIG['list_cols'];