mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:50:15 +00:00
Unified output via the "httpExit" function
This commit is contained in:
parent
d15023fe4b
commit
4a22034be6
16 changed files with 69 additions and 70 deletions
|
@ -291,9 +291,7 @@ class Ping extends BaseModule
|
|||
|
||||
if (isset($_GET['callback'])) {
|
||||
// JSONP support
|
||||
header("Content-type: application/javascript");
|
||||
echo $_GET['callback'] . '(' . json_encode(['result' => $data]) . ')';
|
||||
exit;
|
||||
System::httpExit($_GET['callback'] . '(' . json_encode(['result' => $data]) . ')', Response::TYPE_BLANK, 'application/javascript');
|
||||
} else {
|
||||
System::jsonExit(['result' => $data]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue