X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FMaintenance.php;h=0cb0da9c60e01596a4f457e72d443d599746d08e;hb=c713c2bf622257dbecf223b5f58bf8a98dde9d65;hp=d693cb6e89213641abafcbcc37cfcabecd36510e;hpb=dc49ad090eca1bf4e511091418166da6fe68009b;p=friendica.git diff --git a/src/Core/Console/Maintenance.php b/src/Core/Console/Maintenance.php index d693cb6e89..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 (App\Mode::isInstall()) { + 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);