mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 23:55:26 +02:00
[ticket/11921] Only get the count of unread PMs
PHPBB3-11921
This commit is contained in:
parent
2867831232
commit
bd58c31ee0
@ -5228,13 +5228,11 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
$privmsgs_count = 0;
|
||||
$s_privmsg_new = false;
|
||||
|
||||
// Obtain number of new private messages if user is logged in
|
||||
// Obtain number of unread private messages if user is logged in
|
||||
if (!empty($user->data['is_registered']))
|
||||
{
|
||||
if ($user->data['user_new_privmsg'])
|
||||
{
|
||||
$privmsgs_count = (int) $user->data['user_new_privmsg'];
|
||||
|
||||
if (!$user->data['user_last_privmsg'] || $user->data['user_last_privmsg'] > $user->data['session_last_visit'])
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
@ -5251,7 +5249,6 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
}
|
||||
else
|
||||
{
|
||||
$privmsgs_count = 0;
|
||||
$s_privmsg_new = false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user