From b343de60584ec7022c68f6ee02a9c79f674f3e7f Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 19 Feb 2023 17:42:02 +0100 Subject: [PATCH] Bug login in french --- core/core.php | 9 +++------ core/module/user/view/login/login.php | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/core/core.php b/core/core.php index ed9aaad7..4ed0422c 100644 --- a/core/core.php +++ b/core/core.php @@ -343,12 +343,9 @@ class common } // Langue de l'administration - if ($this->getData(['user']) === []) { - // Installation en cours - self::$i18nUI = array_key_exists($this->getInput('ZWII_UI'), self::$languages) ? $this->getInput('ZWII_UI') : 'fr_FR'; - } else { - // Langue sélectionnée dans le compte - self::$i18nUI = $this->getData(['user', $this->getUser('id'), 'language']); + if ($this->getData(['user']) !== []) { + // Langue sélectionnée dans le compte, la langue du cookie sinon celle du compte ouvert + self::$i18nUI = $this->getData(['user', $this->getUser('id'), 'language']) ? $this->getData(['user', $this->getUser('id'), 'language']) : $this->getInput('ZWII_UI'); // Validation de la langue self::$i18nUI = (empty(self::$i18nUI) || is_null(self::$i18nUI)) && !file_exists(self::I18N_DIR . self::$i18nUI . '.json') diff --git a/core/module/user/view/login/login.php b/core/module/user/view/login/login.php index 91857d14..2e081e68 100644 --- a/core/module/user/view/login/login.php +++ b/core/module/user/view/login/login.php @@ -35,7 +35,7 @@ ]); ?>
- Mot de passe perdu ? +