X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp%2FMode.php;h=7cd16b4bb905e8866af2e28675edd3c77bfaf309;hb=da58b894a4239e95342524eeacb85af7bf6c5a9d;hp=514df91c649d7cc53e1199ea3d2cfce7698ff2b4;hpb=19603fd6a57c9de0015efe93f019ae6d6204259d;p=friendica.git diff --git a/src/App/Mode.php b/src/App/Mode.php index 514df91c64..7cd16b4bb9 100644 --- a/src/App/Mode.php +++ b/src/App/Mode.php @@ -22,9 +22,8 @@ namespace Friendica\App; use Detection\MobileDetect; -use Friendica\Core\Config\ValueObject\Cache; +use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Database\Database; -use Friendica\Util\BasePath; /** * Mode of the current Friendica Node @@ -129,15 +128,13 @@ class Mode * * @throws \Exception */ - public function determine(BasePath $basepath, Database $database, Cache $configCache): Mode + public function determine(string $basePath, Database $database, IManageConfigValues $config): Mode { $mode = 0; - $basepathName = $basepath->getPath(); - - if (!file_exists($basepathName . '/config/local.config.php') - && !file_exists($basepathName . '/config/local.ini.php') - && !file_exists($basepathName . '/.htconfig.php')) { + if (!file_exists($basePath . '/config/local.config.php') && + !file_exists($basePath . '/config/local.ini.php') && + !file_exists($basePath . '/.htconfig.php')) { return new Mode($mode); } @@ -149,7 +146,7 @@ class Mode $mode |= Mode::DBAVAILABLE; - if (!empty($configCache->get('system', 'maintenance'))) { + if (!empty($config->get('system', 'maintenance'))) { return new Mode($mode); }