X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FConsole%2FConfig.php;h=b1c3df54e024fc59738c259c9cddf0b54327292b;hb=f786e8984f1bd61a617f00a3e312181846ab40dd;hp=d67f6cbb966dc42416fb1b31581b173ce64e9204;hpb=3b41535dfe9d8285264ebae2c2c111a359e7288a;p=friendica.git diff --git a/src/Core/Console/Config.php b/src/Core/Console/Config.php index d67f6cbb96..b1c3df54e0 100644 --- a/src/Core/Console/Config.php +++ b/src/Core/Console/Config.php @@ -59,7 +59,7 @@ Description Sets the value of the provided key in the category Notes: - Setting config entries which are manually set in config/local.ini.php may result in + Setting config entries which are manually set in config/local.config.php may result in conflict between database settings and the manual startup settings. Options @@ -84,7 +84,7 @@ HELP; throw new CommandArgsException('Too many arguments'); } - if (!App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) { + if (!$a->getMode()->has(App\Mode::DBCONFIGAVAILABLE)) { $this->out('Database isn\'t ready or populated yet, showing file config only'); } @@ -113,7 +113,7 @@ HELP; if (is_array($value)) { foreach ($value as $k => $v) { - $this->out("{$cat}.{$key}[{$k}] => " . $v); + $this->out("{$cat}.{$key}[{$k}] => " . (is_array($v) ? implode(', ', $v) : $v)); } } else { $this->out("{$cat}.{$key} => " . $value); @@ -124,12 +124,13 @@ HELP; $cat = $this->getArgument(0); Core\Config::load($cat); - if (!is_null($a->config[$cat])) { + if ($a->getConfig()->get($cat) !== null) { $this->out("[{$cat}]"); - foreach ($a->config[$cat] as $key => $value) { + $catVal = $a->getConfig()->get($cat); + foreach ($catVal as $key => $value) { if (is_array($value)) { foreach ($value as $k => $v) { - $this->out("{$key}[{$k}] => " . $v); + $this->out("{$key}[{$k}] => " . (is_array($v) ? implode(', ', $v) : $v)); } } else { $this->out("{$key} => " . $value); @@ -143,16 +144,17 @@ HELP; if (count($this->args) == 0) { Core\Config::load(); - if (Core\Config::get('system', 'config_adapter') == 'jit' && App\Mode::has(App\Mode::DBCONFIGAVAILABLE)) { + if (Core\Config::get('system', 'config_adapter') == 'jit' && $a->getMode()->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'); } - foreach ($a->config as $cat => $section) { + $config = $a->getConfig()->getAll(); + foreach ($config as $cat => $section) { if (is_array($section)) { foreach ($section as $key => $value) { if (is_array($value)) { foreach ($value as $k => $v) { - $this->out("{$cat}.{$key}[{$k}] => " . $v); + $this->out("{$cat}.{$key}[{$k}] => " . (is_array($v) ? implode(', ', $v) : $v)); } } else { $this->out("{$cat}.{$key} => " . $value);