diff options
| author | 2013-10-07 11:31:12 +0200 | |
|---|---|---|
| committer | 2013-10-07 11:31:12 +0200 | |
| commit | 879e9fcd76f65107390bffa7d8c8999cb6c6a853 (patch) | |
| tree | 1e23ae8521c48e8b02c594988fdde5443aed4252 /app/App_FrontController.php | |
| parent | 71282fb72f8d113953aef5eb7be111a14ece3f22 (diff) | |
Fix issue #165: @import CSS enlevés
Implique une modification des fichiers metadata.json pour les thèmes :
ajout d'un champ "files" répertoriant les fichiers CSS à utiliser
Diffstat (limited to 'app/App_FrontController.php')
| -rw-r--r-- | app/App_FrontController.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/app/App_FrontController.php b/app/App_FrontController.php index 920e3baa8..844956cf9 100644 --- a/app/App_FrontController.php +++ b/app/App_FrontController.php @@ -10,13 +10,13 @@ class App_FrontController extends FrontController { $this->loadLibs (); $this->loadModels (); - Session::init (); // lancement de la session doit se faire après chargement des modèles sinon bug (pourquoi ?) + Session::init (); + RSSThemes::init (); + Translate::init (); $this->loadParamsView (); $this->loadStylesAndScripts (); $this->loadNotifications (); - - Translate::init (); } private function loadLibs () { @@ -51,8 +51,12 @@ class App_FrontController extends FrontController { } private function loadStylesAndScripts () { - $theme = $this->conf->theme(); - View::appendStyle (Url::display ('/themes/' . $theme . '/style.css')); + $theme = RSSThemes::get_infos($this->conf->theme()); + if ($theme) { + foreach($theme["files"] as $file) { + View::appendStyle (Url::display ('/themes/' . $theme['path'] . '/' . $file)); + } + } View::appendStyle (Url::display ('/themes/printer/style.css'), 'print'); if (login_is_conf ($this->conf)) { View::appendScript ('https://login.persona.org/include.js'); |
