Add System::jsonError method for ajax call returns
This commit is contained in:
parent
ae7115894f
commit
7e499647e3
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue