Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhura Jayaratne <madhura.cj@gmail.com>2014-11-26 06:11:33 +0300
committerMadhura Jayaratne <madhura.cj@gmail.com>2014-11-26 06:11:33 +0300
commit5e3a4451e6b95f4298976c7bcb9af1531caff68e (patch)
treead411e9558ef11b45cb5b8dedb66a4a6ccf446bd /js/ajax.js
parent783cacbd1e9823374d24a70e237654581b07563c (diff)
Use a separate flag to avoid confusion
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/ajax.js')
-rw-r--r--js/ajax.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/ajax.js b/js/ajax.js
index 8aaef8f77e..2f83f31a69 100644
--- a/js/ajax.js
+++ b/js/ajax.js
@@ -443,9 +443,11 @@ var AJAX = {
AJAX.xhr = null;
if (parseInt(data.redirect_flag) == 1) {
// add one more GET param to display session expiry msg
- var url = window.location.href;
- var tokenlessUrl = url.replace(/&?token=[^&#]*/g, "");
- window.location.href = tokenlessUrl + '&session_expired=1';
+ 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();
}
if (data.fieldWithError) {