alecpl
2008-05-21 2b962c1074c45695da0376f830ec63923743c39e
commit | author | age
15a9d1 1 <?php
T 2
3 /*
4  +-----------------------------------------------------------------------+
5  | program/steps/mail/getunread.inc                                      |
6  |                                                                       |
7  | This file is part of the RoundCube Webmail client                     |
5349b7 8  | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
15a9d1 9  | Licensed under the GNU GPL                                            |
T 10  |                                                                       |
11  | PURPOSE:                                                              |
12  |   Check all mailboxes for unread messages and update GUI              |
13  |                                                                       |
14  +-----------------------------------------------------------------------+
15  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
16  +-----------------------------------------------------------------------+
17
18  $Id$
19
20 */
21
22 $a_folders = $IMAP->list_mailboxes();
23
24 if (!empty($a_folders))
f11541 25 {
c5ac07 26   foreach ($a_folders as $mbox_row)
cf1f0f 27     $OUTPUT->command('set_unread_count', $mbox_row, $IMAP->messagecount($mbox_row, 'UNSEEN'), ($IMAP->get_mailbox_name() == 'INBOX' && $mbox_row == 'INBOX'));
f11541 28 }
15a9d1 29
f11541 30 $OUTPUT->send();
a894ba 31 ?>