| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
- $Id: getunread.inc 269 2006-06-29 23:41:40Z richs $
+ $Id: getunread.inc 543 2007-04-28 18:07:12Z thomasb $
*/
-$REMOTE_REQUEST = TRUE;
-
$a_folders = $IMAP->list_mailboxes();
if (!empty($a_folders))
- {
+{
foreach ($a_folders as $mbox_row)
- {
- $commands = sprintf("this.set_unread_count('%s', %d);\n", addslashes($mbox_row), $IMAP->messagecount($mbox_row, 'UNSEEN'));
- rcube_remote_response($commands, TRUE);
- }
- }
+ $OUTPUT->command('set_unread_count', $mbox_row, $IMAP->messagecount($mbox_row, 'UNSEEN'));
+}
-exit;
+$OUTPUT->send();
?>