X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FMaintenance.php;h=0cb0da9c60e01596a4f457e72d443d599746d08e;hb=c713c2bf622257dbecf223b5f58bf8a98dde9d65;hp=a3e3b80a7eb33f3feae05807a426291f4ca6f59c;hpb=91f405bac4ae94bc883ab1dd32df468fc7eae324;p=friendica.git diff --git a/src/Core/Console/Maintenance.php b/src/Core/Console/Maintenance.php index a3e3b80a7e..0cb0da9c60 100644 --- a/src/Core/Console/Maintenance.php +++ b/src/Core/Console/Maintenance.php @@ -4,9 +4,6 @@ namespace Friendica\Core\Console; use Friendica\Core; -require_once 'boot.php'; -require_once 'include/dba.php'; - /** * @brief Sets maintenance mode for this node * @@ -47,7 +44,7 @@ HELP; protected function doExecute() { - $a = get_app(); + $a = \Friendica\BaseObject::getApp(); if ($this->getOption('v')) { $this->out('Class: ' . __CLASS__); @@ -64,15 +61,10 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - if ($a->isInstallMode()) { + if ($a->getMode()->isInstall()) { throw new \RuntimeException('Database isn\'t ready or populated yet'); } - Core\Config::load(); - - $lang = Core\L10n::getBrowserLanguage(); - Core\L10n::loadTranslationTable($lang); - $enabled = intval($this->getArgument(0)); Core\Config::set('system', 'maintenance', $enabled);