diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-04 07:18:26 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-04 07:18:26 +0000 |
| commit | 5b4aa9fdd7ea0eb70fad25714278613a91cf6b34 (patch) | |
| tree | d5d6a7aefe660bf38106cf0567613ebdf22ecdf1 /roundcubemail/program/steps/mail/func.inc | |
| parent | 1da31d8556f8aadc230e7a419fa6df1100cf281e (diff) | |
- Skip UNSEEN counting when list is empty
git-svn-id: https://svn.roundcube.net/trunk@3710 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail/func.inc')
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index 5e53a75e5..d1850d6cf 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -551,12 +551,16 @@ function rcmail_get_mailbox_name_text() } -function rcmail_send_unread_count($mbox_name, $force=false) +function rcmail_send_unread_count($mbox_name, $force=false, $count=null) { global $RCMAIL; $old_unseen = $_SESSION['unseen_count'][$mbox_name]; - $unseen = $RCMAIL->imap->messagecount($mbox_name, 'UNSEEN', $force); + + if ($count === null) + $unseen = $RCMAIL->imap->messagecount($mbox_name, 'UNSEEN', $force); + else + $unseen = $count; if ($unseen != $old_unseen || ($mbox_name == 'INBOX')) $RCMAIL->output->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX')); |
