From afa8dcb42a5a264d1f6e1f7a3f4a5889c3b5aa66 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 11 Dec 2009 16:18:56 +0000 Subject: [PATCH] Bug #54345 - Do not deliver topics from unreadable forums in the news feed. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10317 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/CHANGELOG.html | 1 + phpBB/feed.php | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 55d45965eb..84cfda6595 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -113,6 +113,7 @@
  • [Change] Send time of last item instead of current time in ATOM Feeds. (Bug #53305)
  • [Change] Use em dash instead of hyphen/minus as separator in ATOM Feeds item statistics. (Bug #53565)
  • [Change] Cache overall, forums, topics and news feeds for anonymous users and bots.
  • +
  • [Change] Do not deliver topics from unreadable forums in the news feed. (Bug #54345)
  • 1.ii. Changes since 3.0.5

    diff --git a/phpBB/feed.php b/phpBB/feed.php index e644afe642..98e8e61349 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -958,7 +958,7 @@ class phpbb_feed_news extends phpbb_feed_base function get_sql() { - global $db, $config; + global $auth, $config, $db; // Get news forums... $sql = 'SELECT forum_id @@ -969,6 +969,12 @@ class phpbb_feed_news extends phpbb_feed_base $in_fid_ary = array(); while ($row = $db->sql_fetchrow($result)) { + // Make sure we can read this forum + if (!$auth->acl_get('f_read', (int) $row['forum_id'])) + { + continue; + } + $in_fid_ary[] = (int) $row['forum_id']; } $db->sql_freeresult($result);