Skip to content

Commit

Permalink
Merge branch 'ticket/bantu/8652' into develop-olympus
Browse files Browse the repository at this point in the history
* ticket/bantu/8652:
  [ticket/8652] Comment for also updating forum watch table in user_notification.
  [ticket/8652] Sending 2 emails on 2 replies
  • Loading branch information
bantu committed Mar 2, 2012
2 parents 2f95a67 + b745302 commit d67fae0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions phpBB/includes/functions_posting.php
Expand Up @@ -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);
Expand Down

0 comments on commit d67fae0

Please sign in to comment.