diff options
| author | 2014-09-15 15:55:35 +0200 | |
|---|---|---|
| committer | 2014-09-15 15:55:35 +0200 | |
| commit | 69c7c1aa48d42656f73c724d7e9062ca19914133 (patch) | |
| tree | ec9f50f4539235a5c7f1e57631d38804d521a2b9 /app | |
| parent | a8e0c26fe204ffd53b8d6498de3fa36e68ac0423 (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')
| -rw-r--r-- | app/Controllers/importExportController.php | 1 | ||||
| -rw-r--r-- | app/FreshRSS.php | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php index a44991335..f329766b8 100644 --- a/app/Controllers/importExportController.php +++ b/app/Controllers/importExportController.php @@ -109,7 +109,6 @@ class FreshRSS_importExport_Controller extends Minz_ActionController { // A *very* basic guess file type function. Only based on filename // That's could be improved but should be enough, at least for a first // implementation. - // TODO: improve this function? if (substr_compare($filename, '.zip', -4) === 0) { return 'zip'; 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 + )); } } |
