From 0595ab959ca65a99befafc1d885e56a838819c6a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 22 Feb 2015 20:17:37 +0100 Subject: [ticket/13647] Move FAQ page to a controller PHPBB3-13647 --- phpBB/config/default/container/services.yml | 1 + phpBB/config/default/container/services_help.yml | 10 ++ phpBB/config/default/routing/help.yml | 3 + phpBB/config/default/routing/routing.yml | 4 + phpBB/faq.php | 90 +------------ phpBB/phpbb/help/controller/help.php | 160 +++++++++++++++++++++++ 6 files changed, 182 insertions(+), 86 deletions(-) create mode 100644 phpBB/config/default/container/services_help.yml create mode 100644 phpBB/config/default/routing/help.yml create mode 100644 phpBB/phpbb/help/controller/help.php diff --git a/phpBB/config/default/container/services.yml b/phpBB/config/default/container/services.yml index c376726b3b..36f22d72d6 100644 --- a/phpBB/config/default/container/services.yml +++ b/phpBB/config/default/container/services.yml @@ -8,6 +8,7 @@ imports: - { resource: services_db.yml } - { resource: services_event.yml } - { resource: services_feed.yml } + - { resource: services_help.yml } - { resource: services_mimetype_guesser.yml } - { resource: services_notification.yml } - { resource: services_password.yml } diff --git a/phpBB/config/default/container/services_help.yml b/phpBB/config/default/container/services_help.yml new file mode 100644 index 0000000000..ae3eafe7b0 --- /dev/null +++ b/phpBB/config/default/container/services_help.yml @@ -0,0 +1,10 @@ +services: + phpbb.help.controller: + class: phpbb\help\controller\help + arguments: + - @controller.helper + - @dispatcher + - @template + - @user + - %core.root_path% + - %core.php_ext% diff --git a/phpBB/config/default/routing/help.yml b/phpBB/config/default/routing/help.yml new file mode 100644 index 0000000000..957d6dab55 --- /dev/null +++ b/phpBB/config/default/routing/help.yml @@ -0,0 +1,3 @@ +phpbb_help_controller: + path: /{mode} + defaults: { _controller: phpbb.help.controller:handle } diff --git a/phpBB/config/default/routing/routing.yml b/phpBB/config/default/routing/routing.yml index 94146e1ec2..d6881f1959 100644 --- a/phpBB/config/default/routing/routing.yml +++ b/phpBB/config/default/routing/routing.yml @@ -7,3 +7,7 @@ # The above will be accessed via app.php?controller=foo and it will # instantiate the "foo_service" service and call the "method" method. # + +phpbb_help_routing: + resource: "help.yml" + prefix: /help diff --git a/phpBB/faq.php b/phpBB/faq.php index ddecd28b00..e6a44f588f 100644 --- a/phpBB/faq.php +++ b/phpBB/faq.php @@ -24,90 +24,8 @@ $user->session_begin(); $auth->acl($user->data); $user->setup(); -$mode = $request->variable('mode', ''); +/** @var \phpbb\controller\helper $controller_helper */ +$controller_helper = $phpbb_container->get('controller.helper'); -// Load the appropriate faq file -switch ($mode) -{ - case 'bbcode': - $l_title = $user->lang['BBCODE_GUIDE']; - $user->add_lang('bbcode', false, true); - break; - - default: - $page_title = $user->lang['FAQ_EXPLAIN']; - $ext_name = $lang_file = ''; - - /** - * You can use this event display a custom help page - * - * @event core.faq_mode_validation - * @var string page_title Title of the page - * @var string mode FAQ that is going to be displayed - * @var string lang_file Language file containing the help data - * @var string ext_name Vendor and extension name where the help - * language file can be loaded from - * @since 3.1.4-RC1 - */ - $vars = array( - 'page_title', - 'mode', - 'lang_file', - 'ext_name', - ); - extract($phpbb_dispatcher->trigger_event('core.faq_mode_validation', compact($vars))); - - $l_title = $page_title; - $user->add_lang(($lang_file) ? $lang_file : 'faq', false, true, $ext_name); - break; -} - -// Pull the array data from the lang pack -$switch_column = $found_switch = false; -$help_blocks = array(); -foreach ($user->help as $help_ary) -{ - if ($help_ary[0] == '--') - { - if ($help_ary[1] == '--') - { - $switch_column = true; - $found_switch = true; - continue; - } - - $template->assign_block_vars('faq_block', array( - 'BLOCK_TITLE' => $help_ary[1], - 'SWITCH_COLUMN' => $switch_column, - )); - - if ($switch_column) - { - $switch_column = false; - } - continue; - } - - $template->assign_block_vars('faq_block.faq_row', array( - 'FAQ_QUESTION' => $help_ary[0], - 'FAQ_ANSWER' => $help_ary[1]) - ); -} - -// Lets build a page ... -$template->assign_vars(array( - 'L_FAQ_TITLE' => $l_title, - 'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'], - - 'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false, - 'S_IN_FAQ' => true, -)); - -page_header($l_title); - -$template->set_filenames(array( - 'body' => 'faq_body.html') -); -make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx")); - -page_footer(); +// TODO send "Moved permanently" header +redirect($controller_helper->route('phpbb_help_controller', array('mode' => $request->variable('mode', 'faq')))); diff --git a/phpBB/phpbb/help/controller/help.php b/phpBB/phpbb/help/controller/help.php new file mode 100644 index 0000000000..e9594a0563 --- /dev/null +++ b/phpBB/phpbb/help/controller/help.php @@ -0,0 +1,160 @@ + + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\help\controller; + +use phpbb\exception\http_exception; + +class help +{ + /** @var \phpbb\controller\helper */ + protected $helper; + + /** @var \phpbb\event\dispatcher_interface */ + protected $dispatcher; + + /** @var \phpbb\template\template */ + protected $template; + + /** @var \phpbb\user */ + protected $user; + + /** @var string */ + protected $root_path; + + /** @var string */ + protected $php_ext; + + /** + * Constructor + * + * @param \phpbb\controller\helper $helper + * @param \phpbb\event\dispatcher_interface $dispatcher + * @param \phpbb\template\template $template + * @param \phpbb\user $user + * @param string $root_path + * @param string $php_ext + */ + public function __construct(\phpbb\controller\helper $helper, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\template\template $template, \phpbb\user $user, $root_path, $php_ext) + { + $this->helper = $helper; + $this->dispatcher = $dispatcher; + $this->template = $template; + $this->user = $user; + $this->root_path = $root_path; + $this->php_ext = $php_ext; + } + + /** + * Controller for /help/{mode} routes + * + * @param string $mode + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object + * @throws http_exception when the $mode is not known by any extension + */ + public function handle($mode) + { + switch ($mode) + { + case 'faq': + case 'bbcode': + $page_title = ($mode === 'faq') ? $this->user->lang['FAQ_EXPLAIN'] : $this->user->lang['BBCODE_GUIDE']; + $this->user->add_lang($mode, false, true); + break; + + default: + $page_title = $this->user->lang['FAQ_EXPLAIN']; + $ext_name = $lang_file = ''; + + /** + * You can use this event display a custom help page + * + * @event core.faq_mode_validation + * @var string page_title Title of the page + * @var string mode FAQ that is going to be displayed + * @var string lang_file Language file containing the help data + * @var string ext_name Vendor and extension name where the help + * language file can be loaded from + * @since 3.1.4-RC1 + */ + $vars = array( + 'page_title', + 'mode', + 'lang_file', + 'ext_name', + ); + extract($this->dispatcher->trigger_event('core.faq_mode_validation', compact($vars))); + + if ($ext_name === '' || $lang_file === '') + { + throw new http_exception(501, 'FEATURE_NOT_AVAILABLE'); + } + + $this->user->add_lang($lang_file, false, true, $ext_name); + break; + + } + + $this->template->assign_vars(array( + 'L_FAQ_TITLE' => $page_title, + 'S_IN_FAQ' => true, + )); + + $this->assign_to_template($this->user->help); + + make_jumpbox(append_sid("{$this->root_path}viewforum.{$this->php_ext}")); + return $this->helper->render('faq_body.html', $page_title); + } + + /** + * Assigns the help data to the template blocks + * + * @param array $help_data + * @return null + */ + protected function assign_to_template(array $help_data) + { + // Pull the array data from the lang pack + $switch_column = $found_switch = false; + foreach ($help_data as $help_ary) + { + if ($help_ary[0] == '--') + { + if ($help_ary[1] == '--') + { + $switch_column = true; + $found_switch = true; + continue; + } + + $this->template->assign_block_vars('faq_block', array( + 'BLOCK_TITLE' => $help_ary[1], + 'SWITCH_COLUMN' => $switch_column, + )); + + if ($switch_column) + { + $switch_column = false; + } + continue; + } + + $this->template->assign_block_vars('faq_block.faq_row', array( + 'FAQ_QUESTION' => $help_ary[0], + 'FAQ_ANSWER' => $help_ary[1], + )); + } + + $this->template->assign_var('SWITCH_COLUMN_MANUALLY', !$found_switch); + } +} -- cgit v1.2.1 From 9bd6535a7df400e73d6f6d69d2b4b1a5d5714bcd Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 22 Feb 2015 22:44:31 +0100 Subject: [ticket/13647] Send 301 status PHPBB3-13647 --- phpBB/faq.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/faq.php b/phpBB/faq.php index e6a44f588f..5d8a97bc26 100644 --- a/phpBB/faq.php +++ b/phpBB/faq.php @@ -27,5 +27,5 @@ $user->setup(); /** @var \phpbb\controller\helper $controller_helper */ $controller_helper = $phpbb_container->get('controller.helper'); -// TODO send "Moved permanently" header +send_status_line(301, 'Moved Permanently'); redirect($controller_helper->route('phpbb_help_controller', array('mode' => $request->variable('mode', 'faq')))); -- cgit v1.2.1 From 19a236205f6e0892be4301b422f5da7479e12941 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 22 Feb 2015 22:44:50 +0100 Subject: [ticket/13647] Generate route links for faq PHPBB3-13647 --- phpBB/includes/acp/acp_contact.php | 5 ++++- phpBB/includes/acp/acp_users.php | 5 ++++- phpBB/includes/functions.php | 4 +++- phpBB/includes/ucp/ucp_pm_compose.php | 5 ++++- phpBB/includes/ucp/ucp_profile.php | 5 ++++- phpBB/posting.php | 4 +++- 6 files changed, 22 insertions(+), 6 deletions(-) diff --git a/phpBB/includes/acp/acp_contact.php b/phpBB/includes/acp/acp_contact.php index 2aa6620835..945add66a4 100644 --- a/phpBB/includes/acp/acp_contact.php +++ b/phpBB/includes/acp/acp_contact.php @@ -105,6 +105,9 @@ class acp_contact $contact_admin_edit = generate_text_for_edit($contact_admin_info, $contact_admin_info_uid, $contact_admin_info_flags); + /** @var \phpbb\controller\helper $controller_helper */ + $controller_helper = $phpbb_container->get('controller.helper'); + $template->assign_vars(array( 'ERRORS' => $error, 'CONTACT_ENABLED' => $config['contact_admin_form_enable'], @@ -116,7 +119,7 @@ class acp_contact 'S_SMILIES_DISABLE_CHECKED' => !$contact_admin_edit['allow_smilies'], 'S_MAGIC_URL_DISABLE_CHECKED' => !$contact_admin_edit['allow_urls'], - 'BBCODE_STATUS' => $user->lang('BBCODE_IS_ON', '', ''), + 'BBCODE_STATUS' => $user->lang('BBCODE_IS_ON', '', ''), 'SMILIES_STATUS' => $user->lang['SMILIES_ARE_ON'], 'IMG_STATUS' => $user->lang['IMAGES_ARE_ON'], 'FLASH_STATUS' => $user->lang['FLASH_IS_ON'], diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 4cefdc2b4f..976589bac1 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -2019,6 +2019,9 @@ class acp_users $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield); + /** @var \phpbb\controller\helper $controller_helper */ + $controller_helper = $phpbb_container->get('controller.helper'); + $template->assign_vars(array( 'S_SIGNATURE' => true, @@ -2029,7 +2032,7 @@ class acp_users 'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '', 'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '', - 'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '', '') : sprintf($user->lang['BBCODE_IS_OFF'], '', ''), + 'BBCODE_STATUS' => $user->lang(($config['allow_sig_bbcode'] ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '', ''), 'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], 'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'], 'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'], diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 66220d8864..4e8e6f475c 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4816,6 +4816,8 @@ function page_header($page_title = '', $display_online_list = false, $item_id = } } + /** @var \phpbb\controller\helper $controller_helper */ + $controller_helper = $phpbb_container->get('controller.helper'); $notification_mark_hash = generate_link_hash('mark_all_notifications_read'); // The following assigns all _common_ variables that may be used at any point in a template. @@ -4869,7 +4871,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id = 'U_PROFILE' => append_sid("{$phpbb_root_path}ucp.$phpEx"), 'U_USER_PROFILE' => get_username_string('profile', $user->data['user_id'], $user->data['username'], $user->data['user_colour']), 'U_MODCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", false, true, $user->session_id), - 'U_FAQ' => append_sid("{$phpbb_root_path}faq.$phpEx"), + 'U_FAQ' => $controller_helper->route('phpbb_help_controller', array('mode' => 'faq')), 'U_SEARCH_SELF' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=egosearch'), 'U_SEARCH_NEW' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=newposts'), 'U_SEARCH_UNANSWERED' => append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=unanswered'), diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 0064fb89fc..fa28bd89a4 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -1120,6 +1120,9 @@ function compose_pm($id, $mode, $action, $user_folders = array()) $form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$config['allow_pm_attach'] || !$auth->acl_get('u_pm_attach')) ? '' : ' enctype="multipart/form-data"'; + /** @var \phpbb\controller\helper $controller_helper */ + $controller_helper = $phpbb_container->get('controller.helper'); + // Start assigning vars for main posting page ... $template->assign_vars(array( 'L_POST_A' => $page_title, @@ -1128,7 +1131,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) 'SUBJECT' => (isset($message_subject)) ? $message_subject : '', 'MESSAGE' => $message_text, - 'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '', '') : sprintf($user->lang['BBCODE_IS_OFF'], '', ''), + 'BBCODE_STATUS' => $user->lang(($bbcode_status ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '', ''), 'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'], 'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'], 'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index c69dd7ef78..ff0c1ed0cb 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -536,6 +536,9 @@ class ucp_profile $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield); + /** @var \phpbb\controller\helper $controller_helper */ + $controller_helper = $phpbb_container->get('controller.helper'); + $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('
', $error) : '', 'SIGNATURE' => $decoded_message['text'], @@ -545,7 +548,7 @@ class ucp_profile 'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '', 'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '', - 'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '', '') : sprintf($user->lang['BBCODE_IS_OFF'], '', ''), + 'BBCODE_STATUS' => $user->lang(($config['allow_sig_bbcode'] ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '', ''), 'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], 'IMG_STATUS' => ($config['allow_sig_img']) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'], 'FLASH_STATUS' => ($config['allow_sig_flash']) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'], diff --git a/phpBB/posting.php b/phpBB/posting.php index ecd9e9f6c0..9768dc6ea7 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1720,6 +1720,8 @@ if (isset($captcha) && $captcha->is_solved() !== false) $form_enctype = (@ini_get('file_uploads') == '0' || strtolower(@ini_get('file_uploads')) == 'off' || !$config['allow_attachments'] || !$auth->acl_get('u_attach') || !$auth->acl_get('f_attach', $forum_id)) ? '' : ' enctype="multipart/form-data"'; add_form_key('posting'); +/** @var \phpbb\controller\helper $controller_helper */ +$controller_helper = $phpbb_container->get('controller.helper'); // Build array of variables for main posting page $page_data = array( @@ -1734,7 +1736,7 @@ $page_data = array( 'USERNAME' => ((!$preview && $mode != 'quote') || $preview) ? $post_data['username'] : '', 'SUBJECT' => $post_data['post_subject'], 'MESSAGE' => $post_data['post_text'], - 'BBCODE_STATUS' => ($bbcode_status) ? sprintf($user->lang['BBCODE_IS_ON'], '', '') : sprintf($user->lang['BBCODE_IS_OFF'], '', ''), + 'BBCODE_STATUS' => $user->lang(($bbcode_status ? 'BBCODE_IS_ON' : 'BBCODE_IS_OFF'), '', ''), 'IMG_STATUS' => ($img_status) ? $user->lang['IMAGES_ARE_ON'] : $user->lang['IMAGES_ARE_OFF'], 'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'], 'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], -- cgit v1.2.1 From 9c6fba558c3c7f650da89febd90a4a4220667d3d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 22 Feb 2015 22:57:14 +0100 Subject: [ticket/13647] Switch FAQ handling in view online to controller PHPBB3-13647 --- phpBB/viewonline.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index ccbdc8d57e..46f67b93fa 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -163,6 +163,9 @@ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary)); $prev_id = $prev_ip = $user_list = array(); $logged_visible_online = $logged_hidden_online = $counter = 0; +/** @var \phpbb\controller\helper $controller_helper */ +$controller_helper = $phpbb_container->get('controller.helper'); + while ($row = $db->sql_fetchrow($result)) { if ($row['user_id'] != ANONYMOUS && !isset($prev_id[$row['user_id']])) @@ -287,11 +290,6 @@ while ($row = $db->sql_fetchrow($result)) $location_url = append_sid("{$phpbb_root_path}search.$phpEx"); break; - case 'faq': - $location = $user->lang['VIEWING_FAQ']; - $location_url = append_sid("{$phpbb_root_path}faq.$phpEx"); - break; - case 'viewonline': $location = $user->lang['VIEWING_ONLINE']; $location_url = append_sid("{$phpbb_root_path}viewonline.$phpEx"); @@ -357,6 +355,13 @@ while ($row = $db->sql_fetchrow($result)) default: $location = $user->lang['INDEX']; $location_url = append_sid("{$phpbb_root_path}index.$phpEx"); + + if ($row['session_page'] === 'app.' . $phpEx . '/help/faq' || + $row['session_page'] === 'app.' . $phpEx . '/help/bbcode') + { + $location = $user->lang['VIEWING_FAQ']; + $location_url = $controller_helper->route('phpbb_help_controller', array('mode' => 'faq')); + } break; } -- cgit v1.2.1 From 7e0d54a331ccb569dafeae8b051db5a34e177b5f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 27 Feb 2015 22:58:51 +0100 Subject: [ticket/13647] Use the Symfony way for redirecting PHPBB3-13647 --- phpBB/faq.php | 8 ++++++-- phpBB/phpbb/help/controller/help.php | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/phpBB/faq.php b/phpBB/faq.php index 5d8a97bc26..7420bc5a95 100644 --- a/phpBB/faq.php +++ b/phpBB/faq.php @@ -27,5 +27,9 @@ $user->setup(); /** @var \phpbb\controller\helper $controller_helper */ $controller_helper = $phpbb_container->get('controller.helper'); -send_status_line(301, 'Moved Permanently'); -redirect($controller_helper->route('phpbb_help_controller', array('mode' => $request->variable('mode', 'faq')))); +$response = new \Symfony\Component\HttpFoundation\RedirectResponse( + $controller_helper->route('phpbb_help_controller', array( + 'mode' => $request->variable('mode', 'faq'), + ), 301) +); +$response->send(); diff --git a/phpBB/phpbb/help/controller/help.php b/phpBB/phpbb/help/controller/help.php index e9594a0563..9cc3b0c8b4 100644 --- a/phpBB/phpbb/help/controller/help.php +++ b/phpBB/phpbb/help/controller/help.php @@ -97,7 +97,7 @@ class help if ($ext_name === '' || $lang_file === '') { - throw new http_exception(501, 'FEATURE_NOT_AVAILABLE'); + throw new http_exception(404, 'Not Found'); } $this->user->add_lang($lang_file, false, true, $ext_name); -- cgit v1.2.1