commit | author | age
|
15a9d1
|
1 |
<?php |
T |
2 |
|
|
3 |
/* |
|
4 |
+-----------------------------------------------------------------------+ |
|
5 |
| program/steps/mail/getunread.inc | |
|
6 |
| | |
|
7 |
| This file is part of the RoundCube Webmail client | |
|
8 |
| Copyright (C) 2005, RoundCube Dev. - Switzerland | |
|
9 |
| Licensed under the GNU GPL | |
|
10 |
| | |
|
11 |
| PURPOSE: | |
|
12 |
| Check all mailboxes for unread messages and update GUI | |
|
13 |
| | |
|
14 |
+-----------------------------------------------------------------------+ |
|
15 |
| Author: Thomas Bruederli <roundcube@gmail.com> | |
|
16 |
+-----------------------------------------------------------------------+ |
|
17 |
|
|
18 |
$Id$ |
|
19 |
|
|
20 |
*/ |
|
21 |
|
|
22 |
$REMOTE_REQUEST = TRUE; |
|
23 |
|
|
24 |
$a_folders = $IMAP->list_mailboxes(); |
|
25 |
|
|
26 |
if (!empty($a_folders)) |
|
27 |
{ |
c5ac07
|
28 |
foreach ($a_folders as $mbox_row) |
15a9d1
|
29 |
{ |
a894ba
|
30 |
$commands = sprintf("this.set_unread_count('%s', %d);\n", addslashes($mbox_row), $IMAP->messagecount($mbox_row, 'UNSEEN')); |
15a9d1
|
31 |
rcube_remote_response($commands, TRUE); |
T |
32 |
} |
|
33 |
} |
|
34 |
|
|
35 |
exit; |
a894ba
|
36 |
?> |