diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-02-27 22:58:51 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-02-27 22:58:51 +0100 |
commit | 7e0d54a331ccb569dafeae8b051db5a34e177b5f (patch) | |
tree | 388fa8a10c6f2433bf6880862897818a7c91c445 | |
parent | 9c6fba558c3c7f650da89febd90a4a4220667d3d (diff) | |
download | forums-7e0d54a331ccb569dafeae8b051db5a34e177b5f.tar forums-7e0d54a331ccb569dafeae8b051db5a34e177b5f.tar.gz forums-7e0d54a331ccb569dafeae8b051db5a34e177b5f.tar.bz2 forums-7e0d54a331ccb569dafeae8b051db5a34e177b5f.tar.xz forums-7e0d54a331ccb569dafeae8b051db5a34e177b5f.zip |
[ticket/13647] Use the Symfony way for redirecting
PHPBB3-13647
-rw-r--r-- | phpBB/faq.php | 8 | ||||
-rw-r--r-- | 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); |