diff options
author | thomascube <thomas@roundcube.net> | 2007-04-28 18:07:12 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2007-04-28 18:07:12 +0000 |
commit | f1154163b0a9efb21d722bc658352739040ffd61 (patch) | |
tree | 28ccaa50bc27fa2c3d10eb8650a9862710668494 /program/steps/mail/check_recent.inc | |
parent | 9e5d051e97441794d765b094ed46d8cc732c3944 (diff) |
Merged branch devel-addressbook from r443 back to trunk
Diffstat (limited to 'program/steps/mail/check_recent.inc')
-rw-r--r-- | program/steps/mail/check_recent.inc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc index ca35725ea..119d481ab 100644 --- a/program/steps/mail/check_recent.inc +++ b/program/steps/mail/check_recent.inc @@ -5,7 +5,7 @@ | program/steps/mail/check_recent.inc | | | | This file is part of the RoundCube Webmail client | - | Copyright (C) 2005, RoundCube Dev. - Switzerland | + | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland | | Licensed under the GNU GPL | | | | PURPOSE: | @@ -19,8 +19,6 @@ */ -$REMOTE_REQUEST = TRUE; - $a_mailboxes = $IMAP->list_mailboxes(); foreach ($a_mailboxes as $mbox_name) @@ -32,10 +30,10 @@ foreach ($a_mailboxes as $mbox_name) $count = $IMAP->messagecount(NULL, 'ALL', TRUE); $unread_count = $IMAP->messagecount(NULL, 'UNSEEN', TRUE); - $commands .= sprintf("this.set_unread_count('%s', %d);\n", addslashes($mbox_name), $unread_count); - $commands .= sprintf("this.set_env('messagecount', %d);\n", $count); - $commands .= sprintf("this.set_rowcount('%s');\n", rcmail_get_messagecount_text($count)); - $commands .= sprintf("this.set_quota('%s');\n", $IMAP->get_quota()); + $OUTPUT->set_env('messagecount', $count); + $OUTPUT->command('set_unread_count', $mbox_name, $unread_count); + $OUTPUT->command('set_rowcount', rcmail_get_messagecount_text()); + $OUTPUT->command('set_quota', $IMAP->get_quota()); // add new message headers to list $a_headers = array(); @@ -46,15 +44,16 @@ foreach ($a_mailboxes as $mbox_name) $a_headers[] = $header; } - $commands .= rcmail_js_message_list($a_headers, TRUE); + rcmail_js_message_list($a_headers, TRUE); } } else { if ($IMAP->messagecount($mbox_name, 'RECENT')) - $commands .= sprintf("this.set_unread_count('%s', %d);\n", addslashes($mbox_name), $IMAP->messagecount($mbox_name, 'UNSEEN')); + $OUTPUT->command('set_unread_count', $mbox_name, $IMAP->messagecount($mbox_name, 'UNSEEN')); } } -rcube_remote_response($commands); +$OUTPUT->send(); + ?> |