aboutsummaryrefslogtreecommitdiff
path: root/app/FreshRSS.php
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-15 15:55:35 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-15 15:55:35 +0200
commit69c7c1aa48d42656f73c724d7e9062ca19914133 (patch)
treeec9f50f4539235a5c7f1e57631d38804d521a2b9 /app/FreshRSS.php
parenta8e0c26fe204ffd53b8d6498de3fa36e68ac0423 (diff)
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.
Diffstat (limited to 'app/FreshRSS.php')
-rw-r--r--app/FreshRSS.php13
1 files changed, 11 insertions, 2 deletions
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
+ ));
}
}