From fa4eaa9576bcd0cbc1ef3caed55be9a96bada5a7 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Fri, 22 Apr 2022 11:06:49 +0200 Subject: [PATCH] =?UTF-8?q?bug=20filtre=20fonte=20install=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/theme/theme.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 4dad9850..ad93ed37 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -499,6 +499,7 @@ class theme extends common { * Accueil de la personnalisation */ public function index() { + // Restaurer les fontes utilisateurs $this->setFonts('user'); @@ -563,7 +564,7 @@ class theme extends common { */ public function fonts() { - // Toutes les fontes installées + // Toutes les fontes installées sont chargées $this->setFonts('all'); // Polices liées au thème @@ -1181,7 +1182,7 @@ class theme extends common { $fileContent = ''; foreach ($this->getData(['fonts', 'imported']) as $fontId => $fontValue) { if ( - ( $scope === 'user' && array_key_exists($fontId, $fontsInstalled) ) + ( $scope === 'user' && in_array($fontId, $fontsInstalled) ) || $scope === 'all' ) { $fileContent .= ''; @@ -1203,7 +1204,7 @@ class theme extends common { $fileContent = ''; foreach ($this->getData(['fonts', 'files']) as $fontId => $fontValue) { if ( - ( $scope === 'user' && array_key_exists($fontId, $fontsInstalled) ) + ( $scope === 'user' && in_array($fontId, $fontsInstalled) ) || $scope === 'all' ) { if (file_exists(self::DATA_DIR . 'fonts/' . $fontValue['resource']) ) {