Skip to content

Commit

Permalink
fix: login language selector settings for allowed languages and hidin…
Browse files Browse the repository at this point in the history
…g dummy langauge (#7023)
  • Loading branch information
bradymiller committed Nov 14, 2023
1 parent 34cc5a2 commit e2b22b1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion interface/login/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,17 @@ function getLanguagesList(): array
$langList = [];

while ($row = sqlFetchArray($res)) {
$langList[] = $row;
if (!$GLOBALS['allow_debug_language'] && $row['lang_description'] == 'dummy') {
continue; // skip the dummy language
}

if ($GLOBALS['language_menu_showall']) {
$langList[] = $row;
} else {
if (in_array($row['lang_description'], $GLOBALS['language_menu_show'])) {
$langList[] = $row;
}
}
}

return $langList;
Expand Down

0 comments on commit e2b22b1

Please sign in to comment.