drapeau trad auto membre connecté + homepage changement de langue

This commit is contained in:
Fred Tempez 2021-12-06 18:17:13 +01:00
parent e9ed9aaa2e
commit 4a81c99b9a
2 changed files with 7 additions and 6 deletions

View File

@ -45,7 +45,7 @@ class common {
// Numéro de version // Numéro de version
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/'; const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/update/raw/branch/master/';
const ZWII_VERSION = '11.2.00.18'; const ZWII_VERSION = '11.2.00.19';
const ZWII_UPDATE_CHANNEL = "test"; const ZWII_UPDATE_CHANNEL = "test";
public static $actions = []; public static $actions = [];
@ -2119,7 +2119,8 @@ class common {
if ($this->getData(['config', 'i18n', $key]) === 'site' if ($this->getData(['config', 'i18n', $key]) === 'site'
OR ( OR (
$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
) )
) { ) {
if ( if (
@ -2135,9 +2136,9 @@ class common {
$select = ' class="i18nFlag" '; $select = ' class="i18nFlag" ';
} }
echo '<li>'; echo '<li>';
echo '<a href="' . helper::baseUrl() . 'translate/i18n/' . $key . '/' . $this->getData(['config', 'i18n',$key]) . '/' . $this->getUrl(0) . '"><img ' . $select . ' class="flag" alt="' . $value . '" src="' . helper::baseUrl(false) . 'core/vendor/i18n/png/' . $key . '.png"/></a>'; echo '<a href="' . helper::baseUrl() . 'translate/i18n/' . $key . '/' . $this->getData(['config', 'i18n',$key]) . '/' . $this->getUrl(0) . '"><img ' . $select . ' class="flag" alt="' . $value . '" src="' . helper::baseUrl(false) . 'core/vendor/i18n/png/' . $key . '.png"/></a>';
echo '</li>'; echo '</li>';
} }
} }
} }

View File

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