diff --git a/CHANGES.md b/CHANGES.md index 1c84e4ea..6f04ef8d 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,11 @@ # Changelog -## Version 13.1.00 +## Version 13.1.01 +Cette version supprime le sélecteur de thème à l'installation. + + +## Version 13.1.00 ### Améliorations diff --git a/core/include/update.inc.php b/core/include/update.inc.php index 2ca14eaa..484ba131 100644 --- a/core/include/update.inc.php +++ b/core/include/update.inc.php @@ -1100,6 +1100,19 @@ if ($this->getData(['core', 'dataVersion']) < 13005) { if ($this->getData(['admin', 'backgroundColorButtonHelp']) === null) { $this->setData(['admin', 'backgroundColorButtonHelp', 'rgba(255, 153, 0, 1)']); } + // Mise à jour $this->setData(['core', 'dataVersion', 13005]); +} + +// Version 13.1.01 +if ($this->getData(['core', 'dataVersion']) < 13101) { + + // Supprime le choix du thème à l'installation + if (is_dir('core/module/install/ressource/themes')) { + $this->deleteDir('core/module/install/ressource/themes') ; + } + + // Mise à jour + $this->setData(['core', 'dataVersion', 13101]); } \ No newline at end of file diff --git a/core/module/install/install.php b/core/module/install/install.php index 5e9a792f..37be2303 100644 --- a/core/module/install/install.php +++ b/core/module/install/install.php @@ -32,9 +32,6 @@ class install extends common public static $updateButtonText = 'Réinstaller'; - // Thèmes proposés à l'installation - public static $themes = []; - public static $newVersion; // Fichiers des Interface @@ -213,40 +210,17 @@ class install extends common mkdir(self::DATA_DIR . 'font'); } - // Installation du thème sélectionné - $dataThemes = json_decode(file_get_contents('core/module/install/ressource/themes/themes.json'), true); - $dataThemes = $dataThemes['themes']; - $themeFilename = $dataThemes[$this->getInput('installTheme', helper::FILTER_STRING_SHORT)]['filename']; - if ($themeFilename !== '') { - $theme = new theme; - $theme->import('core/module/install/ressource/themes/' . $themeFilename); - } - - // 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'); - // Copie des langues de l'UI et génération de la base de données if (is_dir(self::I18N_DIR) === false) { mkdir(self::I18N_DIR); } // Créer la base de données des langues - // copy('core/module/install/ressource/i18n/language.json', self::DATA_DIR . 'language.json'); $this->copyDir('core/module/install/ressource/i18n', self::I18N_DIR); - // unlink(self::I18N_DIR . 'language.json'); // Fixe l'adresse from pour les envois d'email $this->setData(['config', 'smtp', 'from', 'no-reply@' . str_replace('www.', '', $_SERVER['HTTP_HOST'])]); - // Supprimé à cause de l'écrasement des bases - //$this->setData(['module', 'blog', 'posts', 'mon-premier-article', 'userId', $userId]); - //$this->setData(['module', 'blog', 'posts', 'mon-deuxieme-article', 'userId', $userId]); - //$this->setData(['module', 'blog', 'posts', 'mon-troisieme-article', 'userId', $userId]); - // Valeurs en sortie $this->addOutput([ 'redirect' => helper::baseUrl(), @@ -255,13 +229,6 @@ class install extends common ]); } - // Affichage du formulaire - - // Récupération de la liste des thèmes - $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 $this->addOutput([ 'display' => self::DISPLAY_LAYOUT_LIGHT, diff --git a/core/module/install/ressource/themes/theme_affaire.zip b/core/module/install/ressource/themes/theme_affaire.zip deleted file mode 100644 index 0545d8ca..00000000 Binary files a/core/module/install/ressource/themes/theme_affaire.zip and /dev/null differ diff --git a/core/module/install/ressource/themes/theme_moderne.zip b/core/module/install/ressource/themes/theme_moderne.zip deleted file mode 100644 index df01f455..00000000 Binary files a/core/module/install/ressource/themes/theme_moderne.zip and /dev/null differ diff --git a/core/module/install/ressource/themes/theme_old_facebook.zip b/core/module/install/ressource/themes/theme_old_facebook.zip deleted file mode 100644 index 20c341ca..00000000 Binary files a/core/module/install/ressource/themes/theme_old_facebook.zip and /dev/null differ diff --git a/core/module/install/ressource/themes/theme_orange_black.zip b/core/module/install/ressource/themes/theme_orange_black.zip deleted file mode 100644 index e13e5680..00000000 Binary files a/core/module/install/ressource/themes/theme_orange_black.zip and /dev/null differ diff --git a/core/module/install/ressource/themes/themes.json b/core/module/install/ressource/themes/themes.json deleted file mode 100644 index f3cd1d62..00000000 --- a/core/module/install/ressource/themes/themes.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "themes": { - "defaut": { - "name": "Le thème par défaut, ambiance bleu et montagne", - "filename": "" - }, - "moderne": { - "name": "Thème avec la nouvelle bannière personnalisable", - "filename": "theme_moderne.zip" - }, - "affaire": { - "name": "Thème affaire, bannière centre d'appel, ambiance prune", - "filename": "theme_affaire.zip" - }, - "black": { - "name": "Thème de nuit, ambiance nocturne", - "filename": "theme_orange_black.zip" - }, - "facebook": { - "name": "Thème Facebook ancienne génération, pas de bannière, menu fixe fond bleu", - "filename": "theme_old_facebook.zip" - } - } -} \ No newline at end of file diff --git a/core/module/install/view/postinstall/postinstall.php b/core/module/install/view/postinstall/postinstall.php index b86e1199..94b0014a 100644 --- a/core/module/install/view/postinstall/postinstall.php +++ b/core/module/install/view/postinstall/postinstall.php @@ -94,9 +94,6 @@