diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-03 11:46:06 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-09-03 11:46:06 +0000 |
| commit | a23550df2c9df46cb4b292d764225f2df9e960eb (patch) | |
| tree | 559e00290a749b659a7e5c3d5d1991eec298c21b /roundcubemail/program/steps/mail | |
| parent | b8ad3ee86670846ba3b8e2be967e2e8935e79f2f (diff) | |
- Always check INBOX for recent messages, with check_all_folders=false too (#1486912)
git-svn-id: https://svn.roundcube.net/trunk@3936 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
| -rw-r--r-- | roundcubemail/program/steps/mail/check_recent.inc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/roundcubemail/program/steps/mail/check_recent.inc b/roundcubemail/program/steps/mail/check_recent.inc index 19d4fb85f..eb5883111 100644 --- a/roundcubemail/program/steps/mail/check_recent.inc +++ b/roundcubemail/program/steps/mail/check_recent.inc @@ -21,9 +21,18 @@ $current = $IMAP->get_mailbox_name(); $check_all = !empty($_GET['_refresh']) || (bool)$RCMAIL->config->get('check_all_folders'); -$a_mailboxes = $check_all ? $IMAP->list_mailboxes() : (array)$current; -// check recent/unseen counts for all mailboxes +// list of folders to check +if ($check_all) { + $a_mailboxes = $IMAP->list_mailboxes(); +} +else { + $a_mailboxes = (array) $current; + if ($a_mailboxes[0] != 'INBOX') + $a_mailboxes[] = 'INBOX'; +} + +// check recent/unseen counts foreach ($a_mailboxes as $mbox_name) { if ($mbox_name == $current && ($status = $IMAP->mailbox_status($mbox_name))) { @@ -83,5 +92,3 @@ foreach ($a_mailboxes as $mbox_name) { } $OUTPUT->send(); - - |
