From d7df56dfea6ccf1fd9df8b6b6a43de6be6ced3a7 Mon Sep 17 00:00:00 2001 From: JoeKarl757 Date: Fri, 7 Jun 2024 12:44:39 +0200 Subject: [PATCH] Possible issue with themes fixed --- scripts/config_gen.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/config_gen.php b/scripts/config_gen.php index aed5c01dd0..f08f74c6b1 100644 --- a/scripts/config_gen.php +++ b/scripts/config_gen.php @@ -327,14 +327,15 @@ function process_bootswatch_files() { $target = $src . '/' . $folder . '/css/' . $folder . '.css'; if ($folder == 'default') { $content = file_get_contents('vendor/twbs/bootstrap/dist/css/bootstrap.min.css'); - // Append customization done to the default theme - $custom = file_get_contents($target); - $custom = preg_replace('/^@import.+/m', '', $custom); - $custom = preg_replace('/^@charset.+/m', '', $custom); - $content .= "\n" . $custom; } else { $content = file_get_contents('vendor/thomaspark/bootswatch/dist/' . $folder . '/bootstrap.min.css'); } + // Append customization done to the default theme + $custom = file_get_contents($target); + $custom = preg_replace('/^@import.+/m', '', $custom); + $custom = preg_replace('/^@charset.+/m', '', $custom); + $content .= "\n" . $custom; + file_put_contents($target, $content); } }