]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/Maintenance.php
Preload Adapter Fix
[friendica.git] / src / Core / Console / Maintenance.php
index a3e3b80a7eb33f3feae05807a426291f4ca6f59c..0cb0da9c60e01596a4f457e72d443d599746d08e 100644 (file)
@@ -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);