mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 20:08:55 +00:00
[ticket/13757] Properly fix bug with negative PM count
The fix from PR #4548 doesn't work as expected because in phpBB the sql_affectedrows() method always returns a count of matched rows instead of affected rows. This commit fixes bug properly. PHPBB3-13757
This commit is contained in:
parent
365489a317
commit
8f84119743
1 changed files with 2 additions and 1 deletions
|
@ -889,7 +889,8 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
|
||||||
SET pm_unread = 0
|
SET pm_unread = 0
|
||||||
WHERE msg_id = $msg_id
|
WHERE msg_id = $msg_id
|
||||||
AND user_id = $user_id
|
AND user_id = $user_id
|
||||||
AND folder_id = $folder_id";
|
AND folder_id = $folder_id
|
||||||
|
AND pm_unread = 1";
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
// If the message is already marked as read, we just skip the rest to avoid negative PM count
|
// If the message is already marked as read, we just skip the rest to avoid negative PM count
|
||||||
|
|
Loading…
Add table
Reference in a new issue