[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix condition to ignore aborted requests
Browse files Browse the repository at this point in the history
The status=0 happens on network failure as well, so we can't ignore it
completely.

Fixes #13130

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Apr 5, 2017
1 parent a079a55 commit 799ac0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ phpMyAdmin - ChangeLog
- issue #13149 Fixed outbound links in changelog.php
- issue #13146 Do not include devel dependencies in the release
- issue #13144 Do not show New as a database in database dropdown
- issue #13130 Fixed handling of errors in AJAX requests

4.7.0 (2017-03-28)
- patch #12233 [Display] Improve message when renaming database to same name
Expand Down
3 changes: 2 additions & 1 deletion js/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,8 @@ $(document).on('submit', 'form', AJAX.requestHandler);
* (e.g: 500 - Internal server error)
*/
$(document).ajaxError(function (event, request, settings) {
if (request.status !== 0) { // Don't handle aborted requests
// Don't handle aborted requests
if (request.status !== 0 || request.statusText !== 'abort') {
var errorCode = PMA_sprintf(PMA_messages.strErrorCode, request.status);
var errorText = PMA_sprintf(PMA_messages.strErrorText, request.statusText);
PMA_ajaxShowMessage(
Expand Down

0 comments on commit 799ac0d

Please sign in to comment.