Add System::jsonError method for ajax call returns
This commit is contained in:
parent
ae7115894f
commit
7e499647e3
|
@ -176,6 +176,12 @@ class System extends BaseObject
|
|||
exit();
|
||||
}
|
||||
|
||||
public static function jsonError($httpCode, $data, $content_type = 'application/json')
|
||||
{
|
||||
header($_SERVER["SERVER_PROTOCOL"] . ' ' . $httpCode);
|
||||
self::jsonExit($data, $content_type);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encodes content to json.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue
Block a user