From 5008cbf903114047d45f93c88d8ea1444ed377cc Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Thu, 17 Apr 2014 17:39:42 +0200 Subject: [ticket/12418] Notice displayed for feed.php https://tracker.phpbb.com/browse/PHPBB3-12418 language/viewtopic.php isn't loaded, so MISSING_INLINE_ATTACHMENT isn't available. PHPBB3-12418 --- phpBB/feed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/feed.php') diff --git a/phpBB/feed.php b/phpBB/feed.php index c31a6b6b1d..9ff8c66b9d 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -37,7 +37,7 @@ if (!empty($config['feed_http_auth']) && request_var('auth', '') == 'http') } $auth->acl($user->data); -$user->setup(); +$user->setup('viewtopic'); // Initial var setup $forum_id = request_var('f', 0); -- cgit v1.2.1 From e7f970e26d636d69ea742bf591dc5fc9dc15a0a9 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Wed, 16 Apr 2014 23:41:10 +0200 Subject: [ticket/12413] Fatal Error for feed.php?mode=forums https://tracker.phpbb.com/browse/PHPBB3-12413 http://area51.phpbb.com/phpBB/viewtopic.php?f=81&t=45475 PHPBB3-12413 --- phpBB/feed.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'phpBB/feed.php') diff --git a/phpBB/feed.php b/phpBB/feed.php index 9ff8c66b9d..0c4cc32fdb 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -73,9 +73,6 @@ if ($feed === false) trigger_error('NO_FEED'); } -// Get attachments for this feed -$feed->fetch_attachments(); - // Open Feed $feed->open(); @@ -111,7 +108,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'], (($row['post_attachment']) ? $feed->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'], ((isset($row['post_attachment']) && $row['post_attachment']) ? $feed->get_attachments($row['post_id']) : array()))), 'statistics' => '', ); -- cgit v1.2.1 From f4df3f0aaf72ac0bb1a2538b09da971d422e4dcc Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sat, 19 Apr 2014 01:11:52 +0200 Subject: [ticket/12421] Don't parse [attachment] tags if user can't view them https://tracker.phpbb.com/browse/PHPBB3-12421 PHPBB3-12421 --- phpBB/feed.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'phpBB/feed.php') 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' => '', ); -- cgit v1.2.1 From 62b4e7b9d25a8e947d2bec67888ad006f0f1b4b0 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Tue, 6 May 2014 14:54:22 +0200 Subject: [ticket/12421] Rebase and enable tests PHPBB3-12421 --- phpBB/feed.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/feed.php') diff --git a/phpBB/feed.php b/phpBB/feed.php index 90f77747d7..db0ed5364e 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -100,7 +100,7 @@ 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; + $display_attachments = ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && isset($row['post_attachment']) && $row['post_attachment']) ? true : false; $item_row = array( 'author' => ($feed->get('creator') !== NULL) ? $row[$feed->get('creator')] : '', -- cgit v1.2.1