From e2b22b16970c5e99dadb9ace0984ed10a6228fbf Mon Sep 17 00:00:00 2001 From: Brady Miller Date: Tue, 14 Nov 2023 08:15:30 -0800 Subject: [PATCH] fix: login language selector settings for allowed languages and hiding dummy langauge (#7023) --- interface/login/login.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/interface/login/login.php b/interface/login/login.php index 5026661d401..bbcee963e1e 100644 --- a/interface/login/login.php +++ b/interface/login/login.php @@ -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;