mirror of
https://github.com/friendica/friendica
synced 2025-01-08 20:04:43 +00:00
replace DI::mode() with container
This commit is contained in:
parent
3ae9ae8728
commit
caec1ed576
1 changed files with 5 additions and 2 deletions
|
@ -444,13 +444,16 @@ class App
|
||||||
|
|
||||||
$this->registerErrorHandler();
|
$this->registerErrorHandler();
|
||||||
|
|
||||||
DI::mode()->setExecutor(Mode::WORKER);
|
/** @var Mode */
|
||||||
|
$mode = $this->container->create(Mode::class);
|
||||||
|
|
||||||
|
$mode->setExecutor(Mode::WORKER);
|
||||||
|
|
||||||
// Check the database structure and possibly fixes it
|
// Check the database structure and possibly fixes it
|
||||||
Update::check(DI::basePath(), true);
|
Update::check(DI::basePath(), true);
|
||||||
|
|
||||||
// Quit when in maintenance
|
// Quit when in maintenance
|
||||||
if (!DI::mode()->has(Mode::MAINTENANCEDISABLED)) {
|
if (!$mode->has(Mode::MAINTENANCEDISABLED)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue