diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-01-16 15:41:19 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-01-16 15:41:19 +0100 |
commit | 2c33c7e38bc767330b4eebdc9e4d234caca72966 (patch) | |
tree | 4dc81413ed6366c0c942fb67ca8aa7e39d049647 /program/steps | |
parent | 2baeac116abef9d5bcb748c687577d16dce868a0 (diff) |
Make message pagenav (prev/next) work with sorted multi-folder search results
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/func.inc | 4 | ||||
-rw-r--r-- | program/steps/mail/list.inc | 2 | ||||
-rw-r--r-- | program/steps/mail/search.inc | 8 |
3 files changed, 9 insertions, 5 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 3848ec540..45d4242f9 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -76,9 +76,11 @@ if (($_uid = get_input_value('_uid', RCUBE_INPUT_GPC)) && preg_match('/^\d+-[^, $_REQUEST['_uid'] = $_uid; unset($_uid); - if (empty($_REQUEST['_mbox']) && !empty($mbox)) { + // override mbox + if (!empty($mbox)) { $_GET['_mbox'] = $mbox; $_POST['_mbox'] = $mbox; + $RCMAIL->storage->set_folder(($_SESSION['mbox'] = $mbox)); } } diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc index 4b2a955b7..a77d60f32 100644 --- a/program/steps/mail/list.inc +++ b/program/steps/mail/list.inc @@ -90,6 +90,8 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search']) if ($header->parent_uid) $header->parent_uid .= '-'.$header->folder; } + + $OUTPUT->command('select_folder', ''); } } // remove old search data 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']; |