diff --git a/core/class/layout.class.php b/core/class/layout.class.php index 3040f7ff..49af25db 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -1230,8 +1230,8 @@ class layout extends common public function showi18n($lang) { if ( - (isset($_SESSION['ZWII_CONTENT']) - and $_SESSION['ZWII_CONTENT'] === $lang + (isset($_SESSION['ZWII_SITE_CONTENT']) + and $_SESSION['ZWII_SITE_CONTENT'] === $lang ) ) { $select = ' class="i18nFlagSelected" '; diff --git a/core/class/template.class.php b/core/class/template.class.php index a9cb67cb..97548f8e 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -494,8 +494,8 @@ class template $lang = $langId; break; case 'selected': - if (isset($_SESSION['ZWII_CONTENT'])) { - $lang = $_SESSION['ZWII_CONTENT']; + if (isset($_SESSION['ZWII_SITE_CONTENT'])) { + $lang = $_SESSION['ZWII_SITE_CONTENT']; } else { $lang = 'fr_FR'; } diff --git a/core/core.js.php b/core/core.js.php index 0bdc8e6b..9a797b30 100644 --- a/core/core.js.php +++ b/core/core.js.php @@ -532,7 +532,7 @@ $(document).ready(function () { var langSelected = $(this).val(); var langSelected = langSelected.split("/"); // Lit le cookie de langue - var langSession = ""; + var langSession = ""; // Découpe l'URL pour exclure le changement de page avec le thème var url = window.location; var currentUrl = url.href.split("/"); diff --git a/core/core.php b/core/core.php index b001109c..8bdcca18 100644 --- a/core/core.php +++ b/core/core.php @@ -341,15 +341,15 @@ class common } // Déterminer la langue du contenu du site - if (isset($_SESSION['ZWII_CONTENT'])) { + if (isset($_SESSION['ZWII_SITE_CONTENT'])) { // Déterminé par la session présente - self::$siteContent = $_SESSION['ZWII_CONTENT']; + self::$siteContent = $_SESSION['ZWII_SITE_CONTENT']; } else { // Détermine la langue par défaut foreach (self::$languages as $key => $value) { if (file_exists(self::DATA_DIR . $key . '/.default')) { self::$siteContent = $key; - $_SESSION['ZWII_CONTENT'] = $key; + $_SESSION['ZWII_SITE_CONTENT'] = $key; break; } } diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 004d81aa..1d809e3b 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -1068,7 +1068,7 @@ if ($this->getData(['core', 'dataVersion']) < 13000) { } } } - $_SESSION['ZWII_CONTENT'] = $currentlanguage; + $_SESSION['ZWII_SITE_CONTENT'] = $currentlanguage; // Supprime la clé OpenOgraph $this->deleteData(['config', 'seo', 'keyApi']); diff --git a/core/module/install/install.php b/core/module/install/install.php index e64bd43e..e5a677aa 100644 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -119,24 +119,24 @@ class install extends common self::$i18nUI = $_SESSION['ZWII_UI']; self::$i18nUI = array_key_exists(self::$i18nUI, self::$languages) ? self::$i18nUI : 'fr_FR'; // par défaut le contenu est la langue d'installation - $_SESSION['ZWII_CONTENT'] = self::$i18nUI; + $_SESSION['ZWII_SITE_CONTENT'] = self::$i18nUI; // Création du dossier de langue avec le marqueur de langue par défaut - if (!is_dir(self::DATA_DIR . $_SESSION['ZWII_CONTENT'])) { - mkdir(self::DATA_DIR . $_SESSION['ZWII_CONTENT']); - touch(self::DATA_DIR . $_SESSION['ZWII_CONTENT'] . '/.default'); + if (!is_dir(self::DATA_DIR . $_SESSION['ZWII_SITE_CONTENT'])) { + mkdir(self::DATA_DIR . $_SESSION['ZWII_SITE_CONTENT']); + touch(self::DATA_DIR . $_SESSION['ZWII_SITE_CONTENT'] . '/.default'); } // Installation du site de test if ( $this->getInput('installDefaultData', helper::FILTER_BOOLEAN) === false - && $_SESSION['ZWII_CONTENT'] === 'fr_FR' + && $_SESSION['ZWII_SITE_CONTENT'] === 'fr_FR' ) { $sample = true; } - $this->initData('page', $_SESSION['ZWII_CONTENT'], $sample); - $this->initData('module', $_SESSION['ZWII_CONTENT'], $sample); - $this->initData('locale', $_SESSION['ZWII_CONTENT'], $sample); + $this->initData('page', $_SESSION['ZWII_SITE_CONTENT'], $sample); + $this->initData('module', $_SESSION['ZWII_SITE_CONTENT'], $sample); + $this->initData('locale', $_SESSION['ZWII_SITE_CONTENT'], $sample); // Création de l'utilisateur si les données sont complétées. // success retour de l'enregistrement des données @@ -153,7 +153,7 @@ class install extends common 'signature' => 1, 'mail' => $userMail, 'password' => $this->getInput('installPassword', helper::FILTER_PASSWORD, true), - 'language' => $_SESSION['ZWII_CONTENT'] + 'language' => $_SESSION['ZWII_SITE_CONTENT'] ] ]); @@ -172,7 +172,7 @@ class install extends common // Nettoyage fr par défaut if ( - $_SESSION['ZWII_CONTENT'] !== 'fr_FR' + $_SESSION['ZWII_SITE_CONTENT'] !== 'fr_FR' ) { if (is_dir(self::DATA_DIR . 'fr_FR')) $this->deleteDir(self::DATA_DIR . 'fr_FR'); diff --git a/core/module/language/language.php b/core/module/language/language.php index 6e5e1e04..c9e9fb2e 100644 --- a/core/module/language/language.php +++ b/core/module/language/language.php @@ -197,7 +197,7 @@ class language extends common ) { if (file_exists(self::DATA_DIR . $key . '/.default')) { $messageLocale = helper::translate('Langue par défaut'); - } elseif (isset($_SESSION['ZWII_CONTENT']) && $_SESSION['ZWII_CONTENT'] === $key) { + } elseif (isset($_SESSION['ZWII_SITE_CONTENT']) && $_SESSION['ZWII_SITE_CONTENT'] === $key) { $messageLocale = helper::translate('Langue du site sélectionnée'); } else { $messageLocale = ''; @@ -700,7 +700,7 @@ class language extends common ) { // Stocker la sélection - $_SESSION['ZWII_CONTENT'] = $lang; + $_SESSION['ZWII_SITE_CONTENT'] = $lang; } // Valeurs en sortie