Merge remote-tracking branch 'origin/QA_4_5' into QA_4_5
This commit is contained in:
commit
8b561a00bf
@ -22,6 +22,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #11826 Fix creating/editing VIEW with DEFINER containing special chars
|
||||
- issue #11828 Do not invoke FLUSH PRIVILEGES when server in --skip-grant-tables
|
||||
- issue #11804 Misleading message for configuration storage
|
||||
- issue #11772 Table pagination does nothing when session expired
|
||||
|
||||
4.5.3.1 (2015-12-25)
|
||||
- issue #11774 Undefined offset 2
|
||||
|
||||
14
js/ajax.js
14
js/ajax.js
@ -488,19 +488,7 @@ var AJAX = {
|
||||
PMA_ajaxShowMessage(data.error, false);
|
||||
AJAX.active = false;
|
||||
AJAX.xhr = null;
|
||||
if (parseInt(data.redirect_flag) == 1) {
|
||||
// add one more GET param to display session expiry msg
|
||||
if (window.location.href.indexOf('?') === -1) {
|
||||
window.location.href += '?session_expired=1';
|
||||
} else {
|
||||
window.location.href += '&session_expired=1';
|
||||
}
|
||||
window.location.reload();
|
||||
} else if (parseInt(data.reload_flag) == 1) {
|
||||
// remove the token param and reload
|
||||
window.location.href = window.location.href.replace(/&?token=[^&#]*/g, "");
|
||||
window.location.reload();
|
||||
}
|
||||
PMA_handleRedirectAndReload(data);
|
||||
if (data.fieldWithError) {
|
||||
$(':input.error').removeClass("error");
|
||||
$('#'+data.fieldWithError).addClass("error");
|
||||
|
||||
@ -92,6 +92,27 @@ $.ajaxPrefilter(function (options, originalOptions, jqXHR) {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Hanle redirect and reload flags send as part of AJAX requests
|
||||
*
|
||||
* @param data ajax response data
|
||||
*/
|
||||
function PMA_handleRedirectAndReload(data) {
|
||||
if (parseInt(data.redirect_flag) == 1) {
|
||||
// add one more GET param to display session expiry msg
|
||||
if (window.location.href.indexOf('?') === -1) {
|
||||
window.location.href += '?session_expired=1';
|
||||
} else {
|
||||
window.location.href += '&session_expired=1';
|
||||
}
|
||||
window.location.reload();
|
||||
} else if (parseInt(data.reload_flag) == 1) {
|
||||
// remove the token param and reload
|
||||
window.location.href = window.location.href.replace(/&?token=[^&#]*/g, "");
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an SQL editor which supports auto completing etc.
|
||||
*
|
||||
|
||||
@ -961,8 +961,8 @@ function PMA_navigationTreePagination($this) {
|
||||
}
|
||||
}
|
||||
$.post(url, params, function (data) {
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
if (typeof data !== 'undefined' && data.success) {
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
if (isDbSelector) {
|
||||
var val = PMA_fastFilter.getSearchClause();
|
||||
$('#pma_navigation_tree')
|
||||
@ -992,6 +992,7 @@ function PMA_navigationTreePagination($this) {
|
||||
}
|
||||
} else {
|
||||
PMA_ajaxShowMessage(data.error);
|
||||
PMA_handleRedirectAndReload(data);
|
||||
}
|
||||
navTreeStateUpdate();
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user