diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-11-25 20:40:10 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2007-11-25 20:40:10 +0000 |
| commit | 94cf2f11feeb8448995f83967f032768dd7c05df (patch) | |
| tree | ba9d5bcd5cb19b3c64bec3b4172afe3a708db3cc /roundcubemail/program/include | |
| parent | 902ec1456d958887bdc7ee4e1b5877a3c72db5b7 (diff) | |
Only show new messages if they match the current search (#1484176)
git-svn-id: https://svn.roundcube.net/trunk@932 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_imap.inc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/roundcubemail/program/include/rcube_imap.inc b/roundcubemail/program/include/rcube_imap.inc index 5a9994c02..56859b300 100644 --- a/roundcubemail/program/include/rcube_imap.inc +++ b/roundcubemail/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; + } /** |
