X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=772d273c521f7e1555a9e121b009a6cc0106bfaa;hb=15caf4b3f7eacda399a56b1ad8eeb9d3257306d9;hp=4a9552aafb2b2e5b7ea326fed2d788eb7a9247ff;hpb=df135c31fe10777c21c02480262107d9cab0e563;p=friendica.git diff --git a/src/App.php b/src/App.php index 4a9552aafb..772d273c52 100644 --- a/src/App.php +++ b/src/App.php @@ -1,6 +1,6 @@ mode->isInstall() && $moduleName !== 'install') { $this->baseURL->redirect('install'); - } elseif (!$this->mode->isInstall() && !$this->mode->has(App\Mode::MAINTENANCEDISABLED) && $moduleName !== 'maintenance') { - $this->baseURL->redirect('maintenance'); } else { $this->checkURL(); Core\Update::check($this->getBasePath(), false, $this->mode); @@ -544,9 +544,13 @@ class App // Initialize module that can set the current theme in the init() method, either directly or via App->profile_uid $page['page_title'] = $moduleName; - // determine the module class and save it to the module instance - // @todo there's an implicit dependency due SESSION::start(), so it has to be called here (yet) - $module = $module->determineClass($this->args, $router, $this->config); + if (!$this->mode->isInstall() && !$this->mode->has(App\Mode::MAINTENANCEDISABLED)) { + $module = new Module('maintenance', Maintenance::class); + } else { + // determine the module class and save it to the module instance + // @todo there's an implicit dependency due SESSION::start(), so it has to be called here (yet) + $module = $module->determineClass($this->args, $router, $this->config); + } // Let the module run it's internal process (init, get, post, ...) $module->run($this->l10n, $this->baseURL, $this->logger, $this->profiler, $_SERVER, $_POST);