Skip to content

Commit

Permalink
Porting #5161 to develop
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Jan 22, 2023
1 parent 3e00c99 commit 83bd6cc
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@
?>
<script type='text/javascript'>
var themeChanged = false;
var langChanged = false;
var langRefresh = false;
var currentTheme = '';
var currentLang = '';
var rrdArchivePath = '';
Expand Down Expand Up @@ -570,7 +570,7 @@
url: 'settings.php?tab=' + $('#tab').val(),
}

if (themeChanged == true || langChanged == true) {
if (themeChanged == true || langRefresh == true) {
options.redirect = options.url;
}

Expand All @@ -580,7 +580,10 @@
});

if (currentTab == 'general') {
currentPerms = $('#graph_auth_method').val();
currentPerms = $('#graph_auth_method').val();
currentLangDetect = $('#i18n_auto_detection').val();
currentLanguage = $('#i18n_default_language').val();
currentLangSupport = $('#i18n_language_support').val();

$('#selective_plugin_debug').multiselect({
menuHeight: $(window).height() * .7,
Expand Down Expand Up @@ -874,10 +877,14 @@ function themeChanger() {
}

function langDetectionChanger() {
if ($('#i18n_auto_detection').val() != currentLang) {
langChanged = true;
var changed = currentLanguage != $('#i18n_default_language').val() ||
currentLangDetect != $('#i18n_auto_detection').val() ||
currentLangSupport != $('#i18n_language_support').val();

if (changed) {
langRefresh = true;
} else {
langChanged = false;
langRefresh = false;
}
}

Expand Down

0 comments on commit 83bd6cc

Please sign in to comment.