From fc524450b6624106929784a4983bedfc22a84a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Sat, 12 Feb 2022 17:12:12 +0100 Subject: [PATCH] removeDir addon when no folder --- core/include/update.inc.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/include/update.inc.php b/core/include/update.inc.php index ac8171bc..1045356d 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -714,7 +714,7 @@ if ($this->getData(['core', 'dataVersion']) < 11200) { // Option de dévoilement du mdp $this->setData(['config', 'connect', 'showPassword', true]); - + // Mise à jour $this->setData(['core', 'dataVersion', 11200]); } @@ -722,7 +722,7 @@ if ($this->getData(['core', 'dataVersion']) < 11200) { // Version 11.2.02 if ($this->getData(['core', 'dataVersion']) < 11202) { - // Renommer les champs + // Renommer les champs $this->setData(['locale', 'cookies', 'mainLabel', $this->getData(['locale', 'cookies', 'cookiesZwiiText']) ]); $this->setData(['locale', 'cookies', 'gaLabel', $this->getData(['locale', 'cookies', 'cookiesGaText']) ]); $this->setData(['locale', 'cookies', 'titleLabel', $this->getData(['locale', 'cookies', 'cookiesTitleText']) ]); @@ -833,7 +833,7 @@ if ($this->getData(['core', 'dataVersion']) < 11300) { $this->setData(['theme', 'title', 'font', $fonts[ $this->getData (['theme', 'title', 'font' ]) ] ]); $this->setData(['admin', 'fontTitle', $fonts[ $this->getData (['admin', 'fontTitle' ]) ] ]); $this->setData(['admin', 'fontText', $fonts[$this->getData (['admin','fontText' ]) ] ]); - + unlink(self::DATA_DIR . 'admin.css'); unlink(self::DATA_DIR . 'theme.css'); @@ -844,9 +844,11 @@ if ($this->getData(['core', 'dataVersion']) < 11300) { // Version 12.0.00 if ($this->getData(['core', 'dataVersion']) < 12000) { - // Effacer le dossier - $this->removeDir('core/module/addon'); + // Effacer le dossier + if (is_dir('core/module/addon')) { + $this->removeDir('core/module/addon'); + } // Mise à jour $this->setData(['core', 'dataVersion', 12000]); -} +}