aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-03-02 00:19:42 +0100
committerAndreas Fischer <bantu@phpbb.com>2012-03-02 14:20:29 +0100
commitb74530259faa6197d7215d957c180280210a93e0 (patch)
tree1fc2e22565545f0970f3111ca2b309ab7a97f362 /phpBB/includes/functions_posting.php
parent470b79c9e38ea5c37fe5f4685618e5794b6954ad (diff)
downloadforums-b74530259faa6197d7215d957c180280210a93e0.tar
forums-b74530259faa6197d7215d957c180280210a93e0.tar.gz
forums-b74530259faa6197d7215d957c180280210a93e0.tar.bz2
forums-b74530259faa6197d7215d957c180280210a93e0.tar.xz
forums-b74530259faa6197d7215d957c180280210a93e0.zip
[ticket/8652] Comment for also updating forum watch table in user_notification.
PHPBB3-8652
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 38f542264c..f920be9c4b 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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'];
}
}