diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2014-04-07 16:24:37 +0200 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2014-04-07 16:24:37 +0200 |
commit | e8cb51669a325a3d5b60fcc37b99d494809bf837 (patch) | |
tree | be0a7cb9f9de8c158d1a53502598055e9202b5cd /program/lib/Roundcube/rcube_imap.php | |
parent | e7a3ae9a765cef4b2a851ed49a718629e6e8d186 (diff) |
More fixes for multi-folder search (#1485234)
Diffstat (limited to 'program/lib/Roundcube/rcube_imap.php')
-rw-r--r-- | program/lib/Roundcube/rcube_imap.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index f60be620c..a708e1d92 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -1480,10 +1480,6 @@ class rcube_imap extends rcube_storage $str = 'ALL'; } - if (empty($folder)) { - $folder = $this->folder; - } - // multi-folder search if (is_array($folder) && count($folder) > 1 && $str != 'ALL') { new rcube_result_index; // trigger autoloader and make these classes available for threaded context @@ -1506,6 +1502,9 @@ class rcube_imap extends rcube_storage } else { $folder = is_array($folder) ? $folder[0] : $folder; + if (!strlen($folder)) { + $folder = $this->folder; + } $results = $this->search_index($folder, $str, $charset, $sort_field); } @@ -1664,8 +1663,12 @@ class rcube_imap extends rcube_storage public function refresh_search() { if (!empty($this->search_string)) { - // FIXME: make this work with saved multi-folder searches - $this->search('', $this->search_string, $this->search_charset, $this->search_sort_field); + $this->search( + is_object($this->search_set) ? $this->search_set->get_parameters('MAILBOX') : '', + $this->search_string, + $this->search_charset, + $this->search_sort_field + ); } return $this->get_search_set(); |