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
This commit is contained in:
Andreas Fischer 2012-03-02 14:22:18 +01:00
commit d67fae0f09

View file

@ -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);