Skip to content

Commit

Permalink
Ensure to count only the mentions the user has access to when recount…
Browse files Browse the repository at this point in the history
…ing the notifications - fixes #3093
  • Loading branch information
emanuele45 committed Jan 28, 2018
1 parent 6d70c0f commit 4ac0e9c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sources/subs/Mentions.subs.php
Expand Up @@ -534,9 +534,11 @@ function getNewMentions($id_member, $timestamp)
SELECT COUNT(*) AS c
FROM {db_prefix}log_mentions
WHERE status = {int:status}
AND id_member = {int:member}',
AND id_member = {int:member}
AND is_accessible = {int:has_access}',
array(
'status' => 0,
'has_access' => 1,
'member' => $id_member
)
);
Expand All @@ -548,9 +550,11 @@ function getNewMentions($id_member, $timestamp)
FROM {db_prefix}log_mentions
WHERE status = {int:status}
AND log_time > {int:last_seen}
AND id_member = {int:member}',
AND id_member = {int:member}
AND is_accessible = {int:has_access}',
array(
'status' => 0,
'has_access' => 1,
'last_seen' => $timestamp,
'member' => $id_member
)
Expand Down

0 comments on commit 4ac0e9c

Please sign in to comment.