<?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;
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
*
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
protected function doExecute()
{
- $a = get_app();
+ $a = \Friendica\BaseObject::getApp();
if ($this->getOption('v')) {
$this->out('Executable: ' . $this->executable);
throw new CommandArgsException('Too many arguments');
}
- if (!($a->mode & App::MODE_DBCONFIGAVAILABLE)) {
+ if (!$a->getMode()->has(App\Mode::DBCONFIGAVAILABLE)) {
$this->out('Database isn\'t ready or populated yet, showing file config only');
}
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' && $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');
}