Skip to content

Commit

Permalink
Fix bug where after "mark all folders as read" action message counter…
Browse files Browse the repository at this point in the history
…s were not reset (#6307)

also fixed one PHP 7.2 warning
  • Loading branch information
alecpl committed May 26, 2018
1 parent e8de88a commit e5050f8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,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
-------------
Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube_imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,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)
{
Expand Down
3 changes: 1 addition & 2 deletions program/steps/mail/check_recent.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion program/steps/mail/func.inc
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,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 : '');
}
Expand Down
2 changes: 1 addition & 1 deletion program/steps/mail/mark.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e5050f8

Please sign in to comment.