From 655da7a2ccde7d32960f946ac36d099d047dd632 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Tue, 19 Oct 2021 19:37:04 +0200 Subject: [PATCH] =?UTF-8?q?Installation=20des=20th=C3=A8mes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/install/install.php | 11 +++++++++-- core/module/install/view/index/index.php | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/core/module/install/install.php b/core/module/install/install.php index 11f61db7..cc6c6132 100755 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -122,14 +122,21 @@ class install extends common { // Créer sitemap $this->createSitemap(); - // Installation du thème - $dataThemes = file_get_contents("core/module/install/ressource/themes/themes.json"); + // Installation du thème sélectionné + $dataThemes = file_get_contents('core/module/install/ressource/themes/themes.json'); $dataThemes = json_decode($dataThemes, true); $themeId = $dataThemes [$this->getInput('installTheme', helper::FILTER_STRING_SHORT)]['filename']; if ($themeId !== 'default' ) { $theme = new theme; $theme->import('core/module/install/ressource/themes/' . $themeId); } + + // Copie des thèmes dans les fichiers + if (!is_dir(self::FILE_DIR . 'source/theme' )) { + mkdir(self::FILE_DIR . 'source/theme'); + } + $this->copyDir('core/module/install/ressource/themes', self::FILE_DIR . 'source/theme'); + unlink(self::FILE_DIR . 'source/theme/themes.json'); // Valeurs en sortie $this->addOutput([ diff --git a/core/module/install/view/index/index.php b/core/module/install/view/index/index.php index 79d90194..782810a2 100644 --- a/core/module/install/view/index/index.php +++ b/core/module/install/view/index/index.php @@ -39,8 +39,9 @@
'Thème', - ]); ?> + 'label' => 'Thème', + 'help' => 'Le thème pourrait être changé après l\'installation' + ]); ?>