[Svn] r3936 - trunk/roundcubemail/program/steps/mail

trac at roundcube.net trac at roundcube.net
Fri Sep 3 13:46:06 CEST 2010


Author: alec
Date: 2010-09-03 06:46:06 -0500 (Fri, 03 Sep 2010)
New Revision: 3936

Modified:
   trunk/roundcubemail/program/steps/mail/check_recent.inc
Log:
- Always check INBOX for recent messages, with check_all_folders=false too (#1486912)


Modified: trunk/roundcubemail/program/steps/mail/check_recent.inc
===================================================================
--- trunk/roundcubemail/program/steps/mail/check_recent.inc	2010-09-02 17:06:37 UTC (rev 3935)
+++ trunk/roundcubemail/program/steps/mail/check_recent.inc	2010-09-03 11:46:06 UTC (rev 3936)
@@ -21,9 +21,18 @@
 
 $current = $IMAP->get_mailbox_name();
 $check_all = !empty($_GET['_refresh']) || (bool)$RCMAIL->config->get('check_all_folders');
-$a_mailboxes = $check_all ? $IMAP->list_mailboxes() : (array)$current;
 
-// check recent/unseen counts for all mailboxes
+// list of folders to check
+if ($check_all) {
+    $a_mailboxes = $IMAP->list_mailboxes();
+}
+else {
+    $a_mailboxes = (array) $current;
+    if ($a_mailboxes[0] != 'INBOX')
+        $a_mailboxes[] = 'INBOX';
+}
+
+// check recent/unseen counts
 foreach ($a_mailboxes as $mbox_name) {
     if ($mbox_name == $current && ($status = $IMAP->mailbox_status($mbox_name))) {
 
@@ -83,5 +92,3 @@
 }
 
 $OUTPUT->send();
-
-

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list