mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/13827] Use JsonResponse instead of our hacky json_response with exit()
PHPBB3-13827
This commit is contained in:
parent
66279e1a57
commit
502214bf06
1 changed files with 11 additions and 8 deletions
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
namespace phpbb\controller;
|
namespace phpbb\controller;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Generator\UrlGenerator;
|
use Symfony\Component\Routing\Generator\UrlGenerator;
|
||||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||||
|
@ -219,14 +220,16 @@ class helper
|
||||||
{
|
{
|
||||||
global $refresh_data;
|
global $refresh_data;
|
||||||
|
|
||||||
$json_response = new \phpbb\json_response;
|
return new JsonResponse(
|
||||||
$json_response->send(array(
|
array(
|
||||||
'MESSAGE_TITLE' => $message_title,
|
'MESSAGE_TITLE' => $message_title,
|
||||||
'MESSAGE_TEXT' => $message_text,
|
'MESSAGE_TEXT' => $message_text,
|
||||||
'S_USER_WARNING' => false,
|
'S_USER_WARNING' => false,
|
||||||
'S_USER_NOTICE' => false,
|
'S_USER_NOTICE' => false,
|
||||||
'REFRESH_DATA' => (!empty($refresh_data)) ? $refresh_data : null
|
'REFRESH_DATA' => (!empty($refresh_data)) ? $refresh_data : null
|
||||||
));
|
),
|
||||||
|
$code
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->template->assign_vars(array(
|
$this->template->assign_vars(array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue