mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
bugfix: add lost changes due merge
This commit is contained in:
parent
8f0aa0ca5a
commit
4913502922
5 changed files with 30 additions and 11 deletions
|
@ -6,6 +6,7 @@ use Friendica\Core;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Config\Adapter;
|
||||
use Friendica\Core\Config\Cache;
|
||||
use Friendica\Model\Config\Config as ConfigModel;
|
||||
use Friendica\Util\Config\ConfigFileLoader;
|
||||
|
||||
class ConfigFactory
|
||||
|
@ -24,19 +25,20 @@ class ConfigFactory
|
|||
}
|
||||
|
||||
/**
|
||||
* @param Cache\ConfigCache $configCache The config cache of this adapter
|
||||
* @param ConfigModel $configModel The configuration model
|
||||
* @param Cache\ConfigCache $configCache The config cache
|
||||
*
|
||||
* @return Config\Configuration
|
||||
*/
|
||||
public static function createConfig(Cache\ConfigCache $configCache)
|
||||
public static function createConfig(Cache\ConfigCache $configCache, ConfigModel $configModel)
|
||||
{
|
||||
if ($configCache->get('system', 'config_adapter') === 'preload') {
|
||||
$configAdapter = new Adapter\PreloadConfigAdapter();
|
||||
$configuration = new Config\PreloadConfiguration($configCache, $configModel);
|
||||
} else {
|
||||
$configAdapter = new Adapter\JITConfigAdapter();
|
||||
$configuration = new Config\JitConfiguration($configCache, $configModel);
|
||||
}
|
||||
|
||||
$configuration = new Config\Configuration($configCache, $configAdapter);
|
||||
|
||||
// Set the config in the static container for legacy usage
|
||||
Core\Config::init($configuration);
|
||||
|
|
|
@ -8,6 +8,7 @@ use Friendica\Factory;
|
|||
use Friendica\Util\BasePath;
|
||||
use Friendica\Util\BaseURL;
|
||||
use Friendica\Util\Config;
|
||||
use Psr\Log\NullLogger;
|
||||
|
||||
class DependencyFactory
|
||||
{
|
||||
|
@ -31,7 +32,8 @@ class DependencyFactory
|
|||
$configCache = Factory\ConfigFactory::createCache($configLoader);
|
||||
$profiler = Factory\ProfilerFactory::create($configCache);
|
||||
$database = Factory\DBFactory::init($configCache, $profiler, $_SERVER);
|
||||
$config = Factory\ConfigFactory::createConfig($configCache);
|
||||
$configModel = new \Friendica\Model\Config\Config($database);
|
||||
$config = Factory\ConfigFactory::createConfig($configCache, $configModel);
|
||||
// needed to call PConfig::init()
|
||||
Factory\ConfigFactory::createPConfig($configCache, new PConfigCache());
|
||||
$logger = Factory\LoggerFactory::create($channel, $database, $config, $profiler);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue