From edffeecda331195f9fc87535129ccecde28a615c Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 21 Mar 2022 09:33:12 +0100 Subject: [PATCH] fontes okay --- CHANGES.md | 3 ++- core/include/update.inc.php | 20 +++++++++++++++++--- core/module/theme/view/fontAdd/fontAdd.php | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c174411e..95ab67b9 100755 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,7 +3,8 @@ ## Version 11.3.06 ### Corrections : - Bug d'affichage des blocs de présentation. -### Amélioration : + - Double déclaration d'une fonte locale. +### Améliorations : - Sauvegarde des fontes avec le thème. - Une fonte Websafe remplace une fonte locale dont le fichier n'est pas disponible. diff --git a/core/include/update.inc.php b/core/include/update.inc.php index ebe8a045..3f6d3a09 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']) ]); @@ -784,7 +784,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'); @@ -808,3 +808,17 @@ if ($this->getData(['core', 'dataVersion']) < 11303) { // Mise à jour $this->setData(['core', 'dataVersion', 11303]); } + +// Version 11.3.06 +if ($this->getData(['core', 'dataVersion']) < 11306) { + + // Supprime les fontes déclarées en double par la version précédentes + $files = $this->getData(['fonts', 'files']); + foreach ($files as $fontId => $fontFile) { + if ( !is_null($this->getData(['fonts', 'imported', $fontId])) ) { + $this->deleteData(['fonts', 'imported', $fontId]); + } + } + // Mise à jour + $this->setData(['core', 'dataVersion', 11306]); +} diff --git a/core/module/theme/view/fontAdd/fontAdd.php b/core/module/theme/view/fontAdd/fontAdd.php index 9085f503..89bf4839 100644 --- a/core/module/theme/view/fontAdd/fontAdd.php +++ b/core/module/theme/view/fontAdd/fontAdd.php @@ -53,7 +53,7 @@ 'off', 'label' => 'Nom (Font Family)', - 'placeholder' => 'PerryGothic' + 'placeholder' => 'PerryGothic, sans-serif' ]); ?>