A free, self-hostable news aggregator…
Reorganize FreshRSS init
Marien Fressinaud4c128e05a4b1
diff --git a/app/FreshRSS.php b/app/FreshRSS.phpindex 254e35fee..4900528d3 100644--- a/app/FreshRSS.php+++ b/app/FreshRSS.php@@ -6,15 +6,25 @@ class FreshRSS extends Minz_FrontController {Minz_Session::init('FreshRSS');}+ $this->initConfiguration();+ $this->initAuth();+ FreshRSS_Context::init();+ $this->initI18n();+ FreshRSS_Share::load(join_path(DATA_PATH, 'shares.php'));+ $this->loadStylesAndScripts();+ $this->loadNotifications();+ $this->loadExtensions();+ }++ private function initConfiguration() {$current_user = Minz_Session::param('currentUser', '_');Minz_Configuration::register('user',join_path(USERS_PATH, $current_user, 'config.php'),join_path(USERS_PATH, '_', 'config.default.php'));+ }- // Need to be called just after session init because it initializes- // current user.+ private function initAuth() {FreshRSS_Auth::init();-if (Minz_Request::isPost() && !is_referer_from_same_domain()) {// Basic protection against XSRF attacksFreshRSS_Auth::removeAccess();@@ -27,17 +37,6 @@ class FreshRSS extends Minz_FrontController {)));}-- // Load context and configuration.- FreshRSS_Context::init();-- $this->initI18n();-- FreshRSS_Share::load(join_path(DATA_PATH, 'shares.php'));-- $this->loadStylesAndScripts();- $this->loadNotifications();- $this->loadExtensions();}private function initI18n() {