4 +-----------------------------------------------------------------------+
5 | program/steps/mail/getunread.inc |
7 | This file is part of the RoundCube Webmail client |
8 | Copyright (C) 2005, RoundCube Dev. - Switzerland |
9 | Licensed under the GNU GPL |
12 | Check all mailboxes for unread messages and update GUI |
14 +-----------------------------------------------------------------------+
15 | Author: Thomas Bruederli <roundcube@gmail.com> |
16 +-----------------------------------------------------------------------+
18 $Id: getunread.inc 269 2006-06-29 23:41:40Z richs $
22 $REMOTE_REQUEST = TRUE;
24 $a_folders = $IMAP->list_mailboxes();
26 if (!empty($a_folders))
28 foreach ($a_folders as $mbox_row)
30 $commands = sprintf("this.set_unread_count('%s', %d);\n", addslashes($mbox_row), $IMAP->messagecount($mbox_row, 'UNSEEN'));
31 rcube_remote_response($commands, TRUE);