From 69c7c1aa48d42656f73c724d7e9062ca19914133 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Mon, 15 Sep 2014 15:55:35 +0200 Subject: Change loading of base-theme css If metadata.json indicates it should use "_template.css" or "_base.css", base-theme/template|base.css is used. It facilitates theme maintenance. --- app/FreshRSS.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'app/FreshRSS.php') diff --git a/app/FreshRSS.php b/app/FreshRSS.php index cf6390f68..6cca27f78 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -139,11 +139,20 @@ class FreshRSS extends Minz_FrontController { } } - private function loadStylesAndScripts ($loginOk) { + private function loadStylesAndScripts($loginOk) { $theme = FreshRSS_Themes::load($this->conf->theme); if ($theme) { foreach($theme['files'] as $file) { - Minz_View::appendStyle (Minz_Url::display ('/themes/' . $theme['id'] . '/' . $file . '?' . @filemtime(PUBLIC_PATH . '/themes/' . $theme['id'] . '/' . $file))); + $theme_id = $theme['id']; + $filename = $file; + if ($file[0] == '_') { + $theme_id = 'base-theme'; + $filename = substr($file, 1); + } + $filetime = @filemtime(PUBLIC_PATH . '/themes/' . $theme_id . '/' . $filename); + Minz_View::appendStyle(Minz_Url::display( + '/themes/' . $theme_id . '/' . $filename . '?' . $filetime + )); } } -- cgit v1.2.3