diff --git a/CHANGELOG b/CHANGELOG index 2f86a5bfb79..b03c7376470 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -93,6 +93,7 @@ CHANGELOG Roundcube Webmail - Fix bug where some forbidden characters on Cyrus-IMAP were not prevented from use in folder names - Fix bug where only attachments with the same name would be ignored on zip download (#6301) - Fix bug where unicode contact names could have been broken/emptied or caused DB errors (#6299) +- Fix bug where after "mark all folders as read" action message counters were not reset (#6307) RELEASE 1.3.6 ------------- diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index 6f740003a9f..17a501695f2 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -2463,7 +2463,7 @@ public function print_raw_body($uid, $formatted = true) * @param string $folder Folder name * @param boolean $skip_cache True to skip message cache clean up * - * @return boolean Operation status + * @return boolean Operation status */ public function set_flag($uids, $flag, $folder=null, $skip_cache=false) { diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc index 984c53c41cc..ac0f360ebd0 100644 --- a/program/steps/mail/check_recent.inc +++ b/program/steps/mail/check_recent.inc @@ -71,8 +71,7 @@ foreach ($a_mailboxes as $mbox_name) { array('mailbox' => $mbox_name, 'is_current' => $is_current, 'diff' => $diff)); } - rcmail_send_unread_count($mbox_name, true, null, - (!$is_current && ($status & 1)) ? 'recent' : ''); + rcmail_send_unread_count($mbox_name, true, null, (!$is_current && ($status & 1)) ? 'recent' : ''); if ($status && $is_current) { // refresh saved search set diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 0ab2dba0f2c..3a6863817c0 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -756,7 +756,7 @@ function rcmail_send_unread_count($mbox_name, $force=false, $count=null, $mark=' $unseen = $RCMAIL->storage->count($mbox_name, 'UNSEEN', $force); } - if ($unseen != $old_unseen || ($mbox_name == 'INBOX')) { + if ($unseen !== $old_unseen || ($mbox_name == 'INBOX')) { $RCMAIL->output->command('set_unread_count', $mbox_name, $unseen, ($mbox_name == 'INBOX'), $unseen && $mark ? $mark : ''); } diff --git a/program/steps/mail/mark.inc b/program/steps/mail/mark.inc index 1cb8091a2c8..eb5e416f471 100644 --- a/program/steps/mail/mark.inc +++ b/program/steps/mail/mark.inc @@ -70,7 +70,7 @@ if ($_uids && $flag) { foreach ($input as $mbox => $uids) { $marked += (int)$RCMAIL->storage->set_flag($uids, $flag, $mbox); - $count += count($uids); + $count += is_array($uids) ? count($uids) : 1; } if (!$marked) {