Fix bug where after "mark all folders as read" action message counters were not reset (#6307)

also fixed one PHP 7.2 warning
pull/6043/merge
Aleksander Machniak 7 years ago
parent 2275df3bca
commit 12b1b54792

@ -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
-------------

@ -2463,7 +2463,7 @@ class rcube_imap extends rcube_storage
* @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)
{

@ -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

@ -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 : '');
}

@ -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) {

Loading…
Cancel
Save