summaryrefslogtreecommitdiff
path: root/program/steps/mail/getunread.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/getunread.inc')
-rw-r--r--program/steps/mail/getunread.inc13
1 files changed, 4 insertions, 9 deletions
diff --git a/program/steps/mail/getunread.inc b/program/steps/mail/getunread.inc
index ed4a5fb77..e6b3843e4 100644
--- a/program/steps/mail/getunread.inc
+++ b/program/steps/mail/getunread.inc
@@ -19,18 +19,13 @@
*/
-$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();
?>