diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2015-05-14 17:13:47 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2015-05-14 17:13:47 +0200 |
commit | 502214bf066237ac96009e727ab34ed4f4ddbbec (patch) | |
tree | 7b781da2112d45b82600f77d874a46325ab0eef0 /phpBB/phpbb/controller | |
parent | 66279e1a57b7d715f651c118637fdf257e2bf846 (diff) | |
download | forums-502214bf066237ac96009e727ab34ed4f4ddbbec.tar forums-502214bf066237ac96009e727ab34ed4f4ddbbec.tar.gz forums-502214bf066237ac96009e727ab34ed4f4ddbbec.tar.bz2 forums-502214bf066237ac96009e727ab34ed4f4ddbbec.tar.xz forums-502214bf066237ac96009e727ab34ed4f4ddbbec.zip |
[ticket/13827] Use JsonResponse instead of our hacky json_response with exit()
PHPBB3-13827
Diffstat (limited to 'phpBB/phpbb/controller')
-rw-r--r-- | phpBB/phpbb/controller/helper.php | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/phpBB/phpbb/controller/helper.php b/phpBB/phpbb/controller/helper.php index 8b86fb965d..a07a396e73 100644 --- a/phpBB/phpbb/controller/helper.php +++ b/phpBB/phpbb/controller/helper.php @@ -13,6 +13,7 @@ namespace phpbb\controller; +use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Generator\UrlGenerator; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; @@ -219,14 +220,16 @@ class helper { global $refresh_data; - $json_response = new \phpbb\json_response; - $json_response->send(array( - 'MESSAGE_TITLE' => $message_title, - 'MESSAGE_TEXT' => $message_text, - 'S_USER_WARNING' => false, - 'S_USER_NOTICE' => false, - 'REFRESH_DATA' => (!empty($refresh_data)) ? $refresh_data : null - )); + return new JsonResponse( + array( + 'MESSAGE_TITLE' => $message_title, + 'MESSAGE_TEXT' => $message_text, + 'S_USER_WARNING' => false, + 'S_USER_NOTICE' => false, + 'REFRESH_DATA' => (!empty($refresh_data)) ? $refresh_data : null + ), + $code + ); } $this->template->assign_vars(array( |