mirror of
https://github.com/flarum/core.git
synced 2025-07-23 09:41:26 +02:00
allows replacing maintenance mode handler using ioc
This commit is contained in:
committed by
Daniël Klabbers
parent
a0152ffb18
commit
4acff91f80
src/Foundation
@@ -48,7 +48,7 @@ class InstalledApp implements AppInterface
|
||||
public function getRequestHandler()
|
||||
{
|
||||
if ($this->config->inMaintenanceMode()) {
|
||||
return new MaintenanceModeHandler();
|
||||
return $this->container->make('flarum.maintenance.handler');
|
||||
} elseif ($this->needsUpdate()) {
|
||||
return $this->getUpdaterHandler();
|
||||
}
|
||||
|
@@ -105,6 +105,7 @@ class InstalledSite implements SiteInterface
|
||||
$container->alias('flarum.config', Config::class);
|
||||
$container->instance('flarum.debug', $this->config->inDebugMode());
|
||||
$container->instance('config', $config = $this->getIlluminateConfig($laravel));
|
||||
$container->instance('flarum.maintenance.handler', new MaintenanceModeHandler);
|
||||
|
||||
$this->registerLogger($container);
|
||||
$this->registerCache($container);
|
||||
|
Reference in New Issue
Block a user