summaryrefslogtreecommitdiff
path: root/program/steps/mail/getunread.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-18 10:15:17 +0000
committeralecpl <alec@alec.pl>2009-09-18 10:15:17 +0000
commit915e3d19ed1b8c915d276fe3a9a8f50e3ff0da2c (patch)
tree02b33e19ab9d299aac1c5c135599050967833736 /program/steps/mail/getunread.inc
parent98728bdd37274cb8c4cfbe96673a45c793c3cceb (diff)
- fix for last commit in getunread action
Diffstat (limited to 'program/steps/mail/getunread.inc')
-rw-r--r--program/steps/mail/getunread.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/steps/mail/getunread.inc b/program/steps/mail/getunread.inc
index bee2073e3..431ba8a90 100644
--- a/program/steps/mail/getunread.inc
+++ b/program/steps/mail/getunread.inc
@@ -26,11 +26,11 @@ if (!empty($a_folders))
$inbox = ($IMAP->get_mailbox_name() == 'INBOX');
foreach ($a_folders as $mbox_row) {
$unseen = $IMAP->messagecount($mbox_row, 'UNSEEN', !isset($_SESSION['unseen_count'][$mbox_row]));
- $_SESSION['unseen_count'][$mbox_row] = $unseen;
- if ($unseen) {
+ if ($unseen || !isset($_SESSION['unseen_count'][$mbox_row])) {
$OUTPUT->command('set_unread_count', $mbox_row, $unseen, $inbox && $mbox_row == 'INBOX');
}
+ $_SESSION['unseen_count'][$mbox_row] = $unseen;
}
}