aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-03-23 13:25:01 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-03-25 09:28:53 +0100
commita91ffe06c79dd067162fe3d659be44382a20df0e (patch)
treef2d80078c93df1ef57efb30cfd289f4d6ebf93c6 /phpBB
parentbc5f8e30d09be1ded463b7d7a0e0d9b001de6b3b (diff)
downloadforums-a91ffe06c79dd067162fe3d659be44382a20df0e.tar
forums-a91ffe06c79dd067162fe3d659be44382a20df0e.tar.gz
forums-a91ffe06c79dd067162fe3d659be44382a20df0e.tar.bz2
forums-a91ffe06c79dd067162fe3d659be44382a20df0e.tar.xz
forums-a91ffe06c79dd067162fe3d659be44382a20df0e.zip
[ticket/11405] Send post notifications to forum subscribers
Like in 3.0 we should also send notifications about new posts to users that subscribed to the forum. (Subscriptions are verbose) PHPBB3-11405
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/notification/type/post.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/phpBB/includes/notification/type/post.php b/phpBB/includes/notification/type/post.php
index d8ffdea81d..626c13b7fd 100644
--- a/phpBB/includes/notification/type/post.php
+++ b/phpBB/includes/notification/type/post.php
@@ -106,11 +106,26 @@ class phpbb_notification_type_post extends phpbb_notification_type_base
}
$this->db->sql_freeresult($result);
+ $sql = 'SELECT user_id
+ FROM ' . FORUMS_WATCH_TABLE . '
+ WHERE forum_id = ' . (int) $post['forum_id'] . '
+ AND notify_status = ' . NOTIFY_YES . '
+ AND user_id <> ' . (int) $post['poster_id'];
+ $result = $this->db->sql_query($sql);
+ while ($row = $this->db->sql_fetchrow($result))
+ {
+ $users[] = $row['user_id'];
+ }
+ $this->db->sql_freeresult($result);
+
if (empty($users))
{
return array();
}
+ $users = array_unique($users);
+ sort($users);
+
$auth_read = $this->auth->acl_get_list($users, 'f_read', $post['forum_id']);
if (empty($auth_read))