diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-03-02 14:22:18 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-03-02 14:22:18 +0100 |
commit | d67fae0f09b339dc0f399062dd228fba94e5aaa0 (patch) | |
tree | 501c73d35816832e3b36f3463df989212a431908 /phpBB/includes/functions_posting.php | |
parent | 2f95a67765972c7a9836ec058c89caf469993d15 (diff) | |
parent | b74530259faa6197d7215d957c180280210a93e0 (diff) | |
download | forums-d67fae0f09b339dc0f399062dd228fba94e5aaa0.tar forums-d67fae0f09b339dc0f399062dd228fba94e5aaa0.tar.gz forums-d67fae0f09b339dc0f399062dd228fba94e5aaa0.tar.bz2 forums-d67fae0f09b339dc0f399062dd228fba94e5aaa0.tar.xz forums-d67fae0f09b339dc0f399062dd228fba94e5aaa0.zip |
Merge branch 'ticket/bantu/8652' into develop-olympus
* ticket/bantu/8652:
[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 77d92e26e2..f920be9c4b 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); |