drapeau trad mode connecté + homepage changement de langue

This commit is contained in:
Fred Tempez 2021-12-06 18:26:16 +01:00
parent 4a81c99b9a
commit 7508c9a38b
2 changed files with 6 additions and 2 deletions

View File

@ -2118,9 +2118,13 @@ class common {
if ($this->getData(['config', 'i18n', $key]) === 'site' if ($this->getData(['config', 'i18n', $key]) === 'site'
OR ( OR (
// Le script de traduction est actif et la langue est traduite par script
$this->getData(['config', 'i18n','scriptGoogle']) === true $this->getData(['config', 'i18n','scriptGoogle']) === true
AND $this->getData(['config', 'i18n', $key]) === 'script' AND $this->getData(['config', 'i18n', $key]) === 'script'
AND $this->getUser('group') >= self::GROUP_MODERATOR // Le drapeau n'est pas actif pour les non admin en mode connecté.
AND
( $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
OR $this->getUser('group') === self::GROUP_ADMIN )
) )
) { ) {
if ( if (

View File

@ -199,7 +199,7 @@ class translate extends common {
// Valeurs en sortie // Valeurs en sortie
$this->addOutput([ $this->addOutput([
'redirect' => helper::baseUrl() . $this->getData(['locale', $this->getUrl(2), 'homePageId' ]) 'redirect' => helper::baseUrl() . $this->getData(['locale', $this->getUrl(2), 'homePageId' ])
]); ]);
} }
} }