diff options
author | Chirayu Chiripal <chirayu.chiripal@gmail.com> | 2014-07-31 00:45:20 +0400 |
---|---|---|
committer | Chirayu Chiripal <chirayu.chiripal@gmail.com> | 2014-07-31 00:45:20 +0400 |
commit | e9127e535069904276b20e4e15c1378333d87ddb (patch) | |
tree | f417c7bc29ceb29f80d4897e2a1881eae2a0dfeb /js/navigation.js | |
parent | 3a9821de111781cdc093e8b6a083f8aa5abddaf9 (diff) |
fix navigation token mismatch error after relogin
Signed-off-by: Chirayu Chiripal <chirayu.chiripal@gmail.com>
Diffstat (limited to 'js/navigation.js')
-rw-r--r-- | js/navigation.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/js/navigation.js b/js/navigation.js index 477753ec85..ab441d41ee 100644 --- a/js/navigation.js +++ b/js/navigation.js @@ -290,7 +290,9 @@ $(function () { if (typeof storage.navTree === 'undefined') { PMA_showCurrentNavigation(); navTreeStateUpdate(); - } else if (PMA_commonParams.get('server') === storage.server) { + } else if (PMA_commonParams.get('server') === storage.server && + PMA_commonParams.get('token') === storage.token + ) { // Restore the tree from storage $('#pma_navigation_tree_content').html(storage.navTree); $('div.pageselector.dbselector').html(storage.page); @@ -314,12 +316,14 @@ function navTreeStateUpdate() { try { storage.setItem('navTree', $('#pma_navigation_tree_content').html()); storage.setItem('server', PMA_commonParams.get('server')); + storage.setItem('token', PMA_commonParams.get('token')); storage.setItem('page', $('div.pageselector.dbselector').html()); } catch(error) { // storage capacity exceeded & old navigation tree // state is no more valid, so remove it storage.removeItem('navTree'); storage.removeItem('server'); + storage.removeItem('token'); storage.removeItem('page'); } } |