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.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/program/steps/mail/search.inc b/program/steps/mail/search.inc
index 0632b042a..7d128c73c 100644
--- a/program/steps/mail/search.inc
+++ b/program/steps/mail/search.inc
@@ -107,9 +107,12 @@ if (!empty($subject)) {
$search_str = trim($search_str);
$sort_column = rcmail_sort_column();
+// TEMPORARY: search all folders
+$mboxes = $RCMAIL->storage->list_folders_subscribed('', '*', 'mail');
+
// execute IMAP search
if ($search_str)
- $RCMAIL->storage->search($mbox, $search_str, $imap_charset, $sort_column);
+ $RCMAIL->storage->search($mboxes, $search_str, $imap_charset, $sort_column);
// save search results in session
if (!is_array($_SESSION['search']))
@@ -127,17 +130,20 @@ $result_h = $RCMAIL->storage->list_messages($mbox, 1, $sort_column, rcmail_sort_
$count = $RCMAIL->storage->count($mbox, $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL');
// Add 'folder' column to list
-if ($multi_folder_search) {
+if ($_SESSION['search'][1]->multi) {
$a_show_cols = $_SESSION['list_attrib']['columns'] ? $_SESSION['list_attrib']['columns'] : (array)$CONFIG['list_cols'];
- if (!in_array($a_show_cols))
+ if (!in_array('folder', $a_show_cols))
$a_show_cols[] = 'folder';
// make message UIDs unique by appending the folder name
foreach ($result_h as $i => $header) {
$header->uid .= '-'.$header->folder;
+ $header->flags['skip_mbox_check'] = true;
if ($header->parent_uid)
$header->parent_uid .= '-'.$header->folder;
}
+
+ $OUTPUT->command('select_folder', '');
}
// Make sure we got the headers