mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 17:27:16 +02:00
again, a lot of bug fixes
git-svn-id: file:///svn/phpbb/trunk@7909 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -864,6 +864,17 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
|
||||
if ($user->data['user_id'] == $user_id)
|
||||
{
|
||||
$user->data['user_unread_privmsg']--;
|
||||
|
||||
// Try to cope with previous wrong conversions...
|
||||
if ($user->data['user_unread_privmsg'] < 0)
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_unread_privmsg = 0
|
||||
WHERE user_id = $user_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$user->data['user_unread_privmsg'] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user