mirror of
https://github.com/friendica/friendica
synced 2025-04-28 01:10:12 +00: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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue