diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-17 12:36:32 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-17 12:36:32 +0000 |
| commit | 85da924261b7ada8cbbea2de22781b65af882205 (patch) | |
| tree | e01ff10b285b9b20e9d13661331a4c4eabe495b1 /roundcubemail/program/steps/mail/check_recent.inc | |
| parent | d7f648b11a0a0d93ddbd6fa37ce0c33d17976a19 (diff) | |
- some code improvements for r2959 change
git-svn-id: https://svn.roundcube.net/trunk@2960 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 | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/roundcubemail/program/steps/mail/check_recent.inc b/roundcubemail/program/steps/mail/check_recent.inc index d091d611b..58a8e7ea5 100644 --- a/roundcubemail/program/steps/mail/check_recent.inc +++ b/roundcubemail/program/steps/mail/check_recent.inc @@ -69,29 +69,14 @@ foreach ($a_mailboxes as $mbox_name) { } } else { - send_unread_count($mbox_name); + rcmail_send_unread_count($mbox_name, true); } } else if ($check_all) { - send_unread_count($mbox_name); + rcmail_send_unread_count($mbox_name, true); } } $OUTPUT->send(); - -function send_unread_count($mbox_name) -{ - global $RCMAIL; - - $old_unseen = $_SESSION['unseen_count'][$mbox_name]; - $unseen = $RCMAIL->imap->messagecount($mbox_name, 'UNSEEN', true); - - if ($unseen != $old_unseen) - $RCMAIL->output->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX')); - - // @TODO: this data is doubled (session and cache tables) if caching is enabled - $_SESSION['unseen_count'][$mbox_name] = $unseen; -} - ?> |
