From 78f0d66299efe33ffa5e8db4a15001a9250f2833 Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Thu, 23 Feb 2023 22:00:51 +0100 Subject: [PATCH] Install smtp from Bug install theme cause news database --- core/module/config/view/network/network.php | 2 +- core/module/install/install.php | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/module/config/view/network/network.php b/core/module/config/view/network/network.php index e271a924..9bc83afa 100644 --- a/core/module/config/view/network/network.php +++ b/core/module/config/view/network/network.php @@ -51,7 +51,7 @@ 'Expéditeur', 'placeholder' => 'no-reply@host.fr', - 'value' => is_null($this->getData(['config', 'smtp', 'from'])) ? 'no-reply@' . str_replace('www.', '', $_SERVER['HTTP_HOST']) : $this->getData(['config', 'smtp', 'from']), + 'value' => $this->getData(['config', 'smtp', 'from']), ]); ?>
diff --git a/core/module/install/install.php b/core/module/install/install.php index 81e560d3..a382876a 100644 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -231,8 +231,11 @@ class install extends common $this->copyDir('core/module/install/ressource/i18n', self::I18N_DIR); unlink(self::I18N_DIR . 'languages.json'); + // Fixe l'adresse from pour les envois d'email + $this->setData(['config', 'smtp', 'from', 'no-reply@' . str_replace('www.', '', $_SERVER['HTTP_HOST'])]); + // Créer sitemap - // $this->createSitemap(); + $this->createSitemap(); // Mise à jour de la liste des pages pour TinyMCE $this->listPages(); @@ -249,8 +252,8 @@ class install extends common // Affichage du formulaire // Récupération de la liste des thèmes - $dataThemes = file_get_contents('core/module/install/ressource/themes/themes.json'); - $dataThemes = json_decode($dataThemes, true); + $dataThemes = json_decode(file_get_contents('core/module/install/ressource/themes/themes.json'), true); + $dataThemes = $dataThemes['themes']; self::$themes = helper::arrayColumn($dataThemes, 'name'); // Valeurs en sortie