diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-03-02 14:22:32 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-03-02 14:22:32 +0100 |
commit | d6a6d63a9eee208fdfafed1441f19076a8f6d2e1 (patch) | |
tree | 42057e502a8c8336e959f64bbb07da19da4fdc3c /phpBB/includes/functions_posting.php | |
parent | 331f1f90862f4278a82a2d68ce3ad2263ad0ebb8 (diff) | |
parent | d67fae0f09b339dc0f399062dd228fba94e5aaa0 (diff) | |
download | forums-d6a6d63a9eee208fdfafed1441f19076a8f6d2e1.tar forums-d6a6d63a9eee208fdfafed1441f19076a8f6d2e1.tar.gz forums-d6a6d63a9eee208fdfafed1441f19076a8f6d2e1.tar.bz2 forums-d6a6d63a9eee208fdfafed1441f19076a8f6d2e1.tar.xz forums-d6a6d63a9eee208fdfafed1441f19076a8f6d2e1.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/8652] Comment for also updating forum watch table in user_notification.
[ticket/8652] Sending 2 emails on 2 replies
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 104fc841b6..4e4ce5bca7 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1286,6 +1286,20 @@ 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') + { + $update_notification['forum'][] = $row['user_id']; + } } } unset($notify_rows); |