summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2007-11-25 20:40:10 +0000
committerthomascube <thomas@roundcube.net>2007-11-25 20:40:10 +0000
commit11074801923807a9448f7427299ddba76e235e42 (patch)
treee674b11f1ead956a19b3eba3c132b5e0442fd53d /program/include
parentd5342aabcfeddb959cc286befe6de5bf35fe9d76 (diff)
Only show new messages if they match the current search (#1484176)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap.inc16
1 files changed, 15 insertions, 1 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index 5a9994c02..56859b300 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -441,7 +441,7 @@ class rcube_imap
$mailbox = $this->mailbox;
// count search set
- if ($this->search_string && $mailbox == $this->mailbox && $mode == 'ALL')
+ if ($this->search_string && $mailbox == $this->mailbox && $mode == 'ALL' && !$force)
return count((array)$this->search_set);
$a_mailbox_cache = $this->get_cache('messagecount');
@@ -934,6 +934,20 @@ class rcube_imap
return $this->get_search_set();
}
+
+
+ /**
+ * Check if the given message ID is part of the current search set
+ *
+ * @return True on match or if no search request is stored
+ */
+ function in_searchset($msgid)
+ {
+ if (!empty($this->search_string))
+ return in_array("$msgid", (array)$this->search_set, true);
+ else
+ return true;
+ }
/**