diff options
Diffstat (limited to 'app/App_FrontController.php')
| -rw-r--r-- | app/App_FrontController.php | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/app/App_FrontController.php b/app/App_FrontController.php index 637d61206..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 () { @@ -30,6 +30,7 @@ class App_FrontController extends FrontController { include (APP_PATH . '/models/Exception/FeedException.php'); include (APP_PATH . '/models/Exception/EntriesGetterException.php'); include (APP_PATH . '/models/RSSConfiguration.php'); + include (APP_PATH . '/models/RSSThemes.php'); include (APP_PATH . '/models/Days.php'); include (APP_PATH . '/models/Category.php'); include (APP_PATH . '/models/Feed.php'); @@ -50,14 +51,20 @@ class App_FrontController extends FrontController { } private function loadStylesAndScripts () { - View::appendStyle (Url::display ('/theme/fallback.css')); - View::appendStyle (Url::display ('/theme/global.css')); - View::appendStyle (Url::display ('/theme/freshrss.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'); } - View::appendScript (Url::display ('/scripts/jquery.js')); - View::appendScript (Url::display ('/scripts/jquery.lazyload.min.js')); + View::appendScript (Url::display ('/scripts/jquery.min.js')); + if ($this->conf->lazyload () === 'yes') { + View::appendScript (Url::display ('/scripts/jquery.lazyload.min.js')); + } View::appendScript (Url::display ('/scripts/notification.js')); } |
