BUG 0000 Changing use of json_encode native
Modified now use the G:json_encode instead
This commit is contained in:
@@ -2,14 +2,14 @@
|
|||||||
if (!isset($_REQUEST ['action'])) {
|
if (!isset($_REQUEST ['action'])) {
|
||||||
$res ['success'] = 'failure';
|
$res ['success'] = 'failure';
|
||||||
$res ['message'] = 'You may request an action';
|
$res ['message'] = 'You may request an action';
|
||||||
print json_encode($res);
|
print G::json_encode($res);
|
||||||
die ();
|
die ();
|
||||||
}
|
}
|
||||||
if (!function_exists($_REQUEST ['action'])) {
|
if (!function_exists($_REQUEST ['action'])) {
|
||||||
$res ['success'] = 'failure';
|
$res ['success'] = 'failure';
|
||||||
$res ['message'] = 'The requested action doesn\'t exists';
|
$res ['message'] = 'The requested action doesn\'t exists';
|
||||||
header("Content-Type: application/json");
|
header("Content-Type: application/json");
|
||||||
print json_encode($res);
|
print G::json_encode($res);
|
||||||
die ();
|
die ();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ function getExtJSParams() {
|
|||||||
|
|
||||||
function sendJsonResultGeneric($response, $callback) {
|
function sendJsonResultGeneric($response, $callback) {
|
||||||
header("Content-Type: application/json");
|
header("Content-Type: application/json");
|
||||||
$finalResponse = json_encode($response);
|
$finalResponse = G::json_encode($response);
|
||||||
if ($callback != '') {
|
if ($callback != '') {
|
||||||
print $callback . "($finalResponse);";
|
print $callback . "($finalResponse);";
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user