From 0eacd56612e8591e10f0150068162e2999120576 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 17 Dec 2019 16:04:40 +0100 Subject: [PATCH] =?UTF-8?q?[10.0.018.dev]=20pr=C3=A9server=20comptes=20imp?= =?UTF-8?q?ort?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 9 +++++---- core/module/config/config.php | 7 +++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/core.php b/core/core.php index b2938233..4a74303e 100644 --- a/core/core.php +++ b/core/core.php @@ -34,7 +34,7 @@ class common { const TEMP_DIR = 'site/tmp/'; // Numéro de version - const ZWII_VERSION = '10.0.017.dev'; + const ZWII_VERSION = '10.0.018.dev'; public static $actions = []; public static $coreModuleIds = [ @@ -145,9 +145,10 @@ class common { // Import version 9 if (file_exists(self::DATA_DIR . 'core.json') === true && - $this->getData(['core','dataVersion']) < 10000) { - $this->importData($_SESSION['KeepUsers']); - unset ($_SESSION['KeepUsers']); + $this->getData(['core','dataVersion']) < 10000) { + $keepUsers = isset($_SESSION['KEEP_USERS']) ? $_SESSION['KEEP_USERS'] : false; + $this->importData($keepUsers); + unset ($_SESSION['KEEP_USERS']); // Réinstaller htaccess copy('core/module/config/ressource/.htaccess', self::DATA_DIR . '.htaccess'); common::$importNotices [] = "Importation réalisée avec succès" ; diff --git a/core/module/config/config.php b/core/module/config/config.php index 95a2c6f5..daff1768 100755 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -335,9 +335,8 @@ class config extends common { // Préserver les comptes des utilisateurs d'une version 9 si option cochée // Positionnement d'une variable de session lue au constructeur - if ($version === '9' && - $this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true) { - $_SESSION['KeepUsers'] = true; + if ($version === '9') { + $_SESSION['KEEP_USERS'] = $this->getInput('configManageImportUser', helper::FILTER_BOOLEAN); } // Extraire le zip @@ -349,7 +348,7 @@ class config extends common { if (!empty($users) && $version === '10' && $this->getInput('configManageImportUser', helper::FILTER_BOOLEAN) === true) { - $this->setData(['user',$users]); + $this->setData(['user',$users]); } // Message de notification