]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/steps/mail/getunread.inc
Imported Upstream version 0.1~rc1~dfsg
[roundcube.git] / program / steps / mail / getunread.inc
index 2e417e9782b4238f9e927e92bcb38db0d26efc62..41d0a6d5b1d05d95fbf09224669ab466d959bdbb 100644 (file)
  | 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();
 ?>