mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/8652] Comment for also updating forum watch table in user_notification.
PHPBB3-8652
This commit is contained in:
parent
470b79c9e3
commit
b74530259f
1 changed files with 10 additions and 2 deletions
|
@ -1286,10 +1286,18 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
|||
{
|
||||
$msg_users[] = $row;
|
||||
$update_notification[$row['notify_type']][] = $row['user_id'];
|
||||
|
||||
/*
|
||||
* We also update the forums watch table for this user when we are
|
||||
* sending out a topic notification to prevent sending out another
|
||||
* notification in case this user is also subscribed to the forum
|
||||
* this topic was posted in.
|
||||
* Since an UPDATE query is used, this has no effect on users only
|
||||
* subscribed to the topic (i.e. no row is created) and should not
|
||||
* be a performance issue.
|
||||
*/
|
||||
if ($row['notify_type'] === 'topic')
|
||||
{
|
||||
// Using SQL characteristics. If it didn't exist it isn't added.
|
||||
// It's very rare to find someone that is registered in topic and noone is registered in the forum
|
||||
$update_notification['forum'][] = $row['user_id'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue