From a1e1b9dace3bbeddde31f2076f832c8b40e7b35a Mon Sep 17 00:00:00 2001 From: fredtempez Date: Thu, 2 Mar 2023 21:12:45 +0100 Subject: [PATCH] =?UTF-8?q?S=C3=A9curise=20la=20r=C3=A9initialisation=20de?= =?UTF-8?q?s=20BDD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/core/core.php b/core/core.php index 1b422db0..269affc2 100644 --- a/core/core.php +++ b/core/core.php @@ -330,15 +330,16 @@ class common ]); } - // Installation fraîche, initialisation des modules manquants - foreach ($this->dataFiles as $stageId => $item) { - $folder = $this->dataPath($stageId, self::$i18nContent); - if ( - file_exists($folder . $stageId . '.json') === false || - $this->getData([$stageId]) === NULL - ) { - $this->initData($stageId, self::$i18nContent); - common::$coreNotices[] = $stageId; + // Installation fraîche, initialisation des modules + if ($this->user === []) { + foreach ($this->dataFiles as $stageId => $item) { + $folder = $this->dataPath($stageId, self::$i18nContent); + if ( + file_exists($folder . $stageId . '.json') === false + ) { + $this->initData($stageId, self::$i18nContent); + common::$coreNotices[] = $stageId; + } } }