]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/Config.php
Duplicated line removed
[friendica.git] / src / Core / Console / Config.php
index daa0ba60a8caaa90674d560d702dcd3720b322a2..d67f6cbb966dc42416fb1b31581b173ce64e9204 100644 (file)
@@ -1,11 +1,5 @@
 <?php
 
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-
 namespace Friendica\Core\Console;
 
 use Asika\SimpleConsole\CommandArgsException;
@@ -13,9 +7,6 @@ use Friendica\App;
 use Friendica\Core;
 use RuntimeException;
 
-require_once 'include/dba.php';
-require_once 'include/text.php';
-
 /**
  * @brief tool to access the system config from the CLI
  *
@@ -37,8 +28,8 @@ require_once 'include/text.php';
  *   set to the value of the last parameter. (e.g. "system loglevel 0" will
  *   disable logging)
  *
- * @author Tobias Diekershoff
- * @author Hypolite Petovan <mrpetovan@gmail.com>
+ * @author Tobias Diekershoff <tobias.diekershoff@gmx.net>
+ * @author Hypolite Petovan <hypolite@mrpetovan.com>
  */
 class Config extends \Asika\SimpleConsole\Console
 {
@@ -80,7 +71,7 @@ HELP;
 
        protected function doExecute()
        {
-               $a = get_app();
+               $a = \Friendica\BaseObject::getApp();
 
                if ($this->getOption('v')) {
                        $this->out('Executable: ' . $this->executable);
@@ -93,7 +84,7 @@ HELP;
                        throw new CommandArgsException('Too many arguments');
                }
 
-               if (!($a->mode & App::MODE_DBCONFIGAVAILABLE)) {
+               if (!App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) {
                        $this->out('Database isn\'t ready or populated yet, showing file config only');
                }
 
@@ -152,7 +143,7 @@ HELP;
                if (count($this->args) == 0) {
                        Core\Config::load();
 
-                       if (Core\Config::get('system', 'config_adapter') == 'jit' && $a->mode & App::MODE_DBCONFIGAVAILABLE) {
+                       if (Core\Config::get('system', 'config_adapter') == 'jit' && App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) {
                                $this->out('Warning: The JIT (Just In Time) Config adapter doesn\'t support loading the entire configuration, showing file config only');
                        }