From bd58c31ee0a361ba34afa28a0012c24bd77c84b7 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 16 Oct 2013 09:54:01 -0700 Subject: [PATCH] [ticket/11921] Only get the count of unread PMs PHPBB3-11921 --- phpBB/includes/functions.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index a06be1960c..d1614386b6 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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; }