parent
ec5a164971
commit
933b95f5ce
|
@ -2690,13 +2690,18 @@ class H5PCore {
|
||||||
* @param string $message
|
* @param string $message
|
||||||
* @since 1.6.0
|
* @since 1.6.0
|
||||||
*/
|
*/
|
||||||
public static function ajaxError($message = NULL) {
|
public static function ajaxError($message = NULL, $error_code = NULL) {
|
||||||
$response = array(
|
$response = array(
|
||||||
'success' => FALSE
|
'success' => FALSE
|
||||||
);
|
);
|
||||||
if ($message !== NULL) {
|
if ($message !== NULL) {
|
||||||
$response['message'] = $message;
|
$response['message'] = $message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($error_code !== NULL) {
|
||||||
|
$response['error_code'] = $error_code;
|
||||||
|
}
|
||||||
|
|
||||||
self::printJson($response);
|
self::printJson($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue