Creating Friendica\App\Mode for encapsulating the App Mode

This commit is contained in:
Philipp Holzer 2018-10-05 22:36:09 +02:00
parent 3c7d41c388
commit 065340dc32
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
9 changed files with 128 additions and 89 deletions

View file

@ -84,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');
}
@ -143,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');
}