From e56d16b58f67814f1e47650e97fe4e573573954c Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Mon, 21 Nov 2022 10:05:55 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20depuis=2011.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 19 +++++++++++++++++++ core/include/update.inc.php | 14 +------------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/core/core.php b/core/core.php index 1539a692..50149b32 100644 --- a/core/core.php +++ b/core/core.php @@ -324,6 +324,25 @@ class common ]);; } + /** + * Mise à jour à partir de la version 11.5.12 + * */ + if ($this->getData(['core', 'dataVersion']) < 12000) { + + // Correspondance pour les dossiers de langue à convertir + $languages = [ + 'fr' => 'fr_FR', + 'en' => 'en_EN', + 'pt' => 'pt_PT' + ]; + // COnvertit les dossiers vers la nouvelle structure + foreach ($languages as $key => $value) { + if (is_dir(self::DATA_DIR . $key)) { + $this->copyDir(self::DATA_DIR . $key, self::DATA_DIR . $value); + $this->removeDir(self::DATA_DIR . $key); + } + } + } // Installation fraîche, initialisation des modules manquants foreach ($this->dataFiles as $stageId => $item) { diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 2e9d69d3..4a45bd0c 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -859,19 +859,6 @@ if ($this->getData(['core', 'dataVersion']) < 11506) { // Version 11.6.00 if ($this->getData(['core', 'dataVersion']) < 12000) { - // Correspondance pour les dossiers de langue à convertir - $languages = [ - 'fr' => 'fr_FR', - 'en' => 'en_EN', - 'pt' => 'pt_PT' - ]; - // COnvertit les dossiers vers la nouvelle structure - foreach ($languages as $key => $value) { - if (is_dir(self::DATA_DIR . $key)) { - $this->copyDir(self::DATA_DIR . $key, self::DATA_DIR . $value); - $this->removeDir(self::DATA_DIR . $key); - } - } // Supprime un cookie non nécessaire helper::deleteCookie('ZWII_USER_LONGTIME'); @@ -920,6 +907,7 @@ if ($this->getData(['core', 'dataVersion']) < 12000) { } // Langue de l'interface $this->deleteData(['config', 'i18n']); + // Pas à l'installation if ($this->getUser('id')) { $this->setData(['user', $this->getUser('id'), 'language', 'fr_FR']);