Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Dec 28, 2013
2 parents 8688fa4 + f8e485f commit 5c09f55
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,11 @@ AJAX.cache = {
* @return void
*/
navigate: function (index) {
if (typeof this.pages[index] === 'undefined') {
if (typeof this.pages[index] === 'undefined'
|| typeof this.pages[index].content === 'undefined'
|| typeof this.pages[index].menu === 'undefined'
|| ! AJAX.cache.menus.get(this.pages[index].menu)
) {
PMA_ajaxShowMessage(
'<div class="error">' + PMA_messages.strInvalidPage + '</div>',
false
Expand All @@ -557,7 +561,7 @@ AJAX.cache = {
$('#selflink').html(record.selflink);
AJAX.cache.menus.replace(AJAX.cache.menus.get(record.menu));
PMA_commonParams.setAll(record.params);
AJAX.scriptHandler.load(record.scripts, record.params.token);
AJAX.scriptHandler.load(record.scripts, record.params ? record.params.token : PMA_commonParams.get('token'));
AJAX.cache.current = ++index;
});
}
Expand Down

0 comments on commit 5c09f55

Please sign in to comment.