mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-25 19:11:47 +02:00
[ticket/13647] Use the Symfony way for redirecting
PHPBB3-13647
This commit is contained in:
@@ -27,5 +27,9 @@ $user->setup();
|
|||||||
/** @var \phpbb\controller\helper $controller_helper */
|
/** @var \phpbb\controller\helper $controller_helper */
|
||||||
$controller_helper = $phpbb_container->get('controller.helper');
|
$controller_helper = $phpbb_container->get('controller.helper');
|
||||||
|
|
||||||
send_status_line(301, 'Moved Permanently');
|
$response = new \Symfony\Component\HttpFoundation\RedirectResponse(
|
||||||
redirect($controller_helper->route('phpbb_help_controller', array('mode' => $request->variable('mode', 'faq'))));
|
$controller_helper->route('phpbb_help_controller', array(
|
||||||
|
'mode' => $request->variable('mode', 'faq'),
|
||||||
|
), 301)
|
||||||
|
);
|
||||||
|
$response->send();
|
||||||
|
@@ -97,7 +97,7 @@ class help
|
|||||||
|
|
||||||
if ($ext_name === '' || $lang_file === '')
|
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);
|
$this->user->add_lang($lang_file, false, true, $ext_name);
|
||||||
|
Reference in New Issue
Block a user