diff options
author | Tristan Darricau <github@darricau.eu> | 2014-04-19 01:11:52 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-05-06 14:19:55 +0200 |
commit | f4df3f0aaf72ac0bb1a2538b09da971d422e4dcc (patch) | |
tree | 8b5e4ddfdccef1f75b28f70ea1366aa93d1e5c6e /phpBB/feed.php | |
parent | c7d29fbdb1bb0d265e7791ce40699def97f4388e (diff) | |
download | forums-f4df3f0aaf72ac0bb1a2538b09da971d422e4dcc.tar forums-f4df3f0aaf72ac0bb1a2538b09da971d422e4dcc.tar.gz forums-f4df3f0aaf72ac0bb1a2538b09da971d422e4dcc.tar.bz2 forums-f4df3f0aaf72ac0bb1a2538b09da971d422e4dcc.tar.xz forums-f4df3f0aaf72ac0bb1a2538b09da971d422e4dcc.zip |
[ticket/12421] Don't parse [attachment] tags if user can't view them
https://tracker.phpbb.com/browse/PHPBB3-12421
PHPBB3-12421
Diffstat (limited to 'phpBB/feed.php')
-rw-r--r-- | phpBB/feed.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php index 0c4cc32fdb..90f77747d7 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -100,6 +100,8 @@ while ($row = $feed->get_item()) $published = ($feed->get('published') !== NULL) ? (int) $row[$feed->get('published')] : 0; $updated = ($feed->get('updated') !== NULL) ? (int) $row[$feed->get('updated')] : 0; + $display_attachments = ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? true : false; + $item_row = array( 'author' => ($feed->get('creator') !== NULL) ? $row[$feed->get('creator')] : '', 'published' => ($published > 0) ? $phpbb_feed_helper->format_date($published) : '', @@ -108,7 +110,7 @@ while ($row = $feed->get_item()) 'title' => censor_text($title), 'category' => ($config['feed_item_statistics'] && !empty($row['forum_id'])) ? $board_url . '/viewforum.' . $phpEx . '?f=' . $row['forum_id'] : '', 'category_name' => ($config['feed_item_statistics'] && isset($row['forum_name'])) ? $row['forum_name'] : '', - 'description' => censor_text($phpbb_feed_helper->generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options, $row['forum_id'], ((isset($row['post_attachment']) && $row['post_attachment']) ? $feed->get_attachments($row['post_id']) : array()))), + 'description' => censor_text($phpbb_feed_helper->generate_content($row[$feed->get('text')], $row[$feed->get('bbcode_uid')], $row[$feed->get('bitfield')], $options, $row['forum_id'], ($display_attachments ? $feed->get_attachments($row['post_id']) : array()))), 'statistics' => '', ); |