mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge branch '3.1.x'
This commit is contained in:
commit
b499a1ce06
1 changed files with 9 additions and 2 deletions
|
@ -262,8 +262,15 @@ phpbb.ajaxify = function(options) {
|
||||||
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
|
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
|
||||||
}
|
}
|
||||||
phpbb.clearLoadingTimeout();
|
phpbb.clearLoadingTimeout();
|
||||||
var errorText = false;
|
var responseText, errorText = false;
|
||||||
if (typeof errorThrown === 'string' && errorThrown.length > 0) {
|
try {
|
||||||
|
responseText = JSON.parse(jqXHR.responseText);
|
||||||
|
responseText = responseText.message;
|
||||||
|
} catch (e) {}
|
||||||
|
if (typeof responseText === 'string' && responseText.length > 0) {
|
||||||
|
errorText = responseText;
|
||||||
|
}
|
||||||
|
else if (typeof errorThrown === 'string' && errorThrown.length > 0) {
|
||||||
errorText = errorThrown;
|
errorText = errorThrown;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue