From 9dcc5a28a6551b6237f1265820cf0b5579754368 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 24 Nov 2020 13:59:25 +0100 Subject: [PATCH] =?UTF-8?q?Affichage=20cr=C3=A9dits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/core/core.php b/core/core.php index 0c97a9a0..f9b3f467 100755 --- a/core/core.php +++ b/core/core.php @@ -233,7 +233,7 @@ class common { if ( isset($_COOKIE['ZWII_USER_I18N']) ) { $lan_cookie = $_COOKIE['ZWII_USER_I18N']; } - // Lire la langue du navigateur + // Lire la langue du navigateur if ( $this->getData(['config','translate','autoDetect'])) { $lan_browser = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); } @@ -2157,10 +2157,10 @@ class core extends common { // Librairie googtrans ajouté dynamiquement if ( $this->getData(['config','translate','activated']) === true - AND ( $this->getData(['config','translate','admin']) === true - OR $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') + OR ( $this->getData(['config','translate','admin']) === true + AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) - ) + ) { $this->addOutput([ 'vendor' => array_merge($this->output['vendor'], ['i18n']) @@ -2300,14 +2300,24 @@ class layout extends common { } echo $this->core->output['content']; - if ( substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr' + if ( ( + ( $this->getData(['config','translate','activated']) === true + AND substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) !== 'fr' + ) + OR ( isset($_COOKIES['ZWII_USER_I18N']) + AND array_key_exists($_COOKIES['ZWII_USER_I18N'],$this->i18nList + AND $_COOKIES['ZWII_USER_I18N'] !== 'fr' ) + ) + ) AND $this->getData(['config','translate','showCredits']) === true - AND $this->getData(['config','translate','activated']) === true ) + ) { echo ''; } } + + /** * Affiche le contenu de la barre gauche *