From 9ae67cd2f35a6672c527674ff7f9b3aa2dadc3e7 Mon Sep 17 00:00:00 2001 From: fredtempez Date: Sat, 6 Jan 2024 23:17:45 +0100 Subject: [PATCH] =?UTF-8?q?Sauvegarde=20des=20fontes=20install=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/module/theme/theme.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index f1cd7182..7670303e 100644 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -1226,13 +1226,15 @@ class theme extends common // Ajoute les fontes $zip->addEmptyDir(self::DATA_DIR . 'font'); $fonts = $this->getData(['font', 'files']); - foreach ($fonts as $fontId => $fontName) { - $zip->addFile(self::DATA_DIR . 'font/' . $fontName, self::DATA_DIR . 'font/' . $fontName); + foreach ($fonts as $fontId => $fontInfo) { + $zip->addFile($fontInfo['resource'], $fontInfo['resource']); } if (file_exists(self::DATA_DIR . 'font/font.html')) { - $zip->addFile(self::DATA_DIR . 'font/font.html', self::DATA_DIR . 'font/font.html'); } + if (file_exists(self::DATA_DIR . 'font/font.css')) { + $zip->addFile(self::DATA_DIR . 'font/font.css', self::DATA_DIR . 'font/font.css'); + } break; } $ret = $zip->close();