mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-22 01:21:23 +02:00
Merge branch '3.2.x'
This commit is contained in:
@@ -892,6 +892,12 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
|
|||||||
AND folder_id = $folder_id";
|
AND folder_id = $folder_id";
|
||||||
$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 (!$db->sql_affectedrows())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||||
SET user_unread_privmsg = user_unread_privmsg - 1
|
SET user_unread_privmsg = user_unread_privmsg - 1
|
||||||
WHERE user_id = $user_id";
|
WHERE user_id = $user_id";
|
||||||
|
Reference in New Issue
Block a user