diff options
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 55b41aa7fa..eb2d52cf61 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -263,6 +263,20 @@ if (!$topic_data) $forum_id = (int) $topic_data['forum_id']; +/** + * Modify the forum ID to handle the correct display of viewtopic if needed + * + * @event core.viewtopic_modify_forum_id + * @var string forum_id forum ID + * @var array topic_data array of topic's data + * @since 3.2.5-RC1 + */ +$vars = array( + 'forum_id', + 'topic_data', +); +extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_forum_id', compact($vars))); + // If the request is missing the f parameter, the forum id in the user session data is 0 at the moment. // Let's fix that now so that the user can't hide from the forum's Who Is Online list. $user->page['forum'] = $forum_id; @@ -342,6 +356,12 @@ if (($topic_data['topic_type'] != POST_NORMAL) && $topic_data['topic_time_limit' // Setup look and feel $user->setup('viewtopic', $topic_data['forum_style']); +if ($view == 'print' && !$auth->acl_get('f_print', $forum_id)) +{ + send_status_line(403, 'Forbidden'); + trigger_error('NO_AUTH_PRINT_TOPIC'); +} + $overrides_f_read_check = false; $overrides_forum_password_check = false; $topic_tracking_info = isset($topic_tracking_info) ? $topic_tracking_info : null; |