mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 04:33:47 +08:00
allows replacing maintenance mode handler using ioc
This commit is contained in:
parent
79abf87e8c
commit
7906660a9b
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user