From dda7074034dba945fe61ae264705d934f6c34bdf Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 5 Sep 2023 21:21:18 +0200 Subject: [PATCH] =?UTF-8?q?Plut=C3=B4t=20Course?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/class/layout.class.php | 4 ++-- core/class/router.class.php | 2 +- core/class/template.class.php | 4 ++-- core/core.js.php | 2 +- core/core.php | 4 ++-- core/module/install/install.php | 20 ++++++++++---------- core/module/language/language.php | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/class/layout.class.php b/core/class/layout.class.php index 531e180..e44d5eb 100644 --- a/core/class/layout.class.php +++ b/core/class/layout.class.php @@ -1231,8 +1231,8 @@ class layout extends common public function showi18n($lang) { if ( - (isset($_SESSION['ZWII_CLASS']) - and $_SESSION['ZWII_CLASS'] === $lang + (isset($_SESSION['ZWII_COURSE']) + and $_SESSION['ZWII_COURSE'] === $lang ) ) { $select = ' class="i18nFlagSelected" '; diff --git a/core/class/router.class.php b/core/class/router.class.php index a8010a3..d248759 100644 --- a/core/class/router.class.php +++ b/core/class/router.class.php @@ -513,7 +513,7 @@ class core extends common is_array($pagesId['page']) && array_key_exists($this->getUrl(0), $pagesId['page']) ) { - $_SESSION['ZWII_CLASS'] = $key; + $_SESSION['ZWII_COURSE'] = $key; header('Refresh:0; url=' . helper::baseUrl() . $this->getUrl(0)); exit(); } diff --git a/core/class/template.class.php b/core/class/template.class.php index d6565b2..76187fa 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_CLASS'])) { - $lang = $_SESSION['ZWII_CLASS']; + if (isset($_SESSION['ZWII_COURSE'])) { + $lang = $_SESSION['ZWII_COURSE']; } else { $lang = 'fr_FR'; } diff --git a/core/core.js.php b/core/core.js.php index bf0ec96..fc9eecb 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 bbbc64a..d8239ca 100644 --- a/core/core.php +++ b/core/core.php @@ -303,9 +303,9 @@ class common // $this->input['_SESSION'] = $_SESSION; // Déterminer la langue du contenu du site - if (isset($_SESSION['ZWII_CLASS'])) { + if (isset($_SESSION['ZWII_COURSE'])) { // Déterminé par la session présente - self::$classesContent = $_SESSION['ZWII_CLASS']; + self::$classesContent = $_SESSION['ZWII_COURSE']; } // Instanciation de la classe des entrées / sorties diff --git a/core/module/install/install.php b/core/module/install/install.php index a6ec8ba..2f41376 100644 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -120,24 +120,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_CLASS'] = self::$i18nUI; + $_SESSION['ZWII_COURSE'] = self::$i18nUI; // Création du dossier de langue avec le marqueur de langue par défaut - if (!is_dir(self::DATA_DIR . $_SESSION['ZWII_CLASS'])) { - mkdir(self::DATA_DIR . $_SESSION['ZWII_CLASS']); - touch(self::DATA_DIR . $_SESSION['ZWII_CLASS'] . '/.default'); + if (!is_dir(self::DATA_DIR . $_SESSION['ZWII_COURSE'])) { + mkdir(self::DATA_DIR . $_SESSION['ZWII_COURSE']); + touch(self::DATA_DIR . $_SESSION['ZWII_COURSE'] . '/.default'); } // Installation du site de test if ( $this->getInput('installDefaultData', helper::FILTER_BOOLEAN) === false - && $_SESSION['ZWII_CLASS'] === 'fr_FR' + && $_SESSION['ZWII_COURSE'] === 'fr_FR' ) { $sample = true; } - $this->initData('page', $_SESSION['ZWII_CLASS'], $sample); - $this->initData('module', $_SESSION['ZWII_CLASS'], $sample); - $this->initData('config', $_SESSION['ZWII_CLASS'], $sample); + $this->initData('page', $_SESSION['ZWII_COURSE'], $sample); + $this->initData('module', $_SESSION['ZWII_COURSE'], $sample); + $this->initData('config', $_SESSION['ZWII_COURSE'], $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_CLASS'] + 'language' => $_SESSION['ZWII_COURSE'] ] ]); @@ -172,7 +172,7 @@ class install extends common // Nettoyage fr par défaut if ( - $_SESSION['ZWII_CLASS'] !== 'fr_FR' + $_SESSION['ZWII_COURSE'] !== '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 19932c8..d5a5b58 100644 --- a/core/module/language/language.php +++ b/core/module/language/language.php @@ -532,7 +532,7 @@ class language extends common ) { // Stocker la sélection - $_SESSION['ZWII_CLASS'] = $lang; + $_SESSION['ZWII_COURSE'] = $lang; } // Valeurs en sortie