summaryrefslogtreecommitdiff
path: root/program/steps/mail/check_recent.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-17 12:36:32 +0000
committeralecpl <alec@alec.pl>2009-09-17 12:36:32 +0000
commitcbeea3d4d092f6ae2310175a57fe15b43d608b33 (patch)
treeef4b728613e90b78532d937ba171b41d64acd07b /program/steps/mail/check_recent.inc
parent78925f8f1a9afb9475a9cf9ad1b35daade23da85 (diff)
- some code improvements for r2959 change
Diffstat (limited to 'program/steps/mail/check_recent.inc')
-rw-r--r--program/steps/mail/check_recent.inc19
1 files changed, 2 insertions, 17 deletions
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index d091d611b..58a8e7ea5 100644
--- a/program/steps/mail/check_recent.inc
+++ b/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;
-}
-
?>