Skip to content

Commit

Permalink
Handle failure when dropping db via ajax
Browse files Browse the repository at this point in the history
  • Loading branch information
roccivic committed Oct 30, 2012
1 parent 6ec9cf4 commit 008fe93
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions js/functions.js
Expand Up @@ -2147,12 +2147,16 @@ AJAX.registerOnload('functions.js', function() {
$(this).PMA_confirm(question, $(this).attr('href'), function(url) {
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
$.get(url, {'is_js_confirmed': '1', 'ajax_request': true}, function(data) {
//Database deleted successfully, refresh both the frames
PMA_reloadNavigation();
PMA_commonParams.set('db', '');
PMA_commonActions.refreshMain('index.php', function () {
PMA_ajaxShowMessage(data.message);
});
if (data.success) {
//Database deleted successfully, refresh both the frames
PMA_reloadNavigation();
PMA_commonParams.set('db', '');
PMA_commonActions.refreshMain('index.php', function () {
PMA_ajaxShowMessage(data.message);
});
} else {
PMA_ajaxShowMessage(data.error, false);
}
});
});
});
Expand Down

0 comments on commit 008fe93

Please sign in to comment.