diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-18 09:02:35 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-09-18 09:02:35 +0000 |
| commit | 8219df7241e3c96bb6b7f9abfa057b8a64b1839f (patch) | |
| tree | 98c1a74c5e98c4d2d0fa76f3344acb5d3bf04ecb /roundcubemail/program/steps/mail/check_recent.inc | |
| parent | 68000ee62bccc327ce4b9d90da3d4e6c8bf178f4 (diff) | |
- Cache synchronization using QRESYNC/CONDSTORE
- Fixed message ID updates in cache
- Changed message flags handling + some fixes (e.g. fixed messages listing after delete)
git-svn-id: https://svn.roundcube.net/trunk@5233 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/check_recent.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/check_recent.inc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/check_recent.inc b/roundcubemail/program/steps/mail/check_recent.inc index 0eab345ec..c7d607cf9 100644 --- a/roundcubemail/program/steps/mail/check_recent.inc +++ b/roundcubemail/program/steps/mail/check_recent.inc @@ -34,16 +34,24 @@ else { // check recent/unseen counts foreach ($a_mailboxes as $mbox_name) { + $is_current = $mbox_name == $current; + if ($is_current) { + // Synchronize mailbox cache, handle flag changes + $IMAP->mailbox_sync($mbox_name); + } + + // Get mailbox status $status = $IMAP->mailbox_status($mbox_name); if ($status & 1) { // trigger plugin hook - $RCMAIL->plugins->exec_hook('new_messages', array('mailbox' => $mbox_name)); + $RCMAIL->plugins->exec_hook('new_messages', + array('mailbox' => $mbox_name, 'is_current' => $is_current)); } rcmail_send_unread_count($mbox_name, true); - if ($status && $mbox_name == $current) { + if ($status && $is_current) { // refresh saved search set $search_request = get_input_value('_search', RCUBE_INPUT_GPC); if ($search_request && isset($_SESSION['search']) |
