Commit c8c6e46f authored by catch's avatar catch

Issue #2014245 by chx: Move drupal_bootstrap_config_storage() to settings.

parent 40f25ec1
......@@ -6,7 +6,7 @@
*/
namespace Drupal\Core\Config;
use Drupal\Component\Utility\Settings;
/**
* Defines a factory for retrieving the config storage used pre-kernel.
......@@ -20,8 +20,10 @@ class BootstrapConfigStorageFactory {
* A configuration storage implementation.
*/
public static function get() {
if (isset($GLOBALS['conf']['drupal_bootstrap_config_storage'])) {
return call_user_func($GLOBALS['conf']['drupal_bootstrap_config_storage']);
$settings = Settings::getSingleton();
$drupal_bootstrap_config_storage = $settings->get('drupal_bootstrap_config_storage');
if ($drupal_bootstrap_config_storage && is_callable($drupal_bootstrap_config_storage)) {
return call_user_func($drupal_bootstrap_config_storage);
}
else {
return new FileStorage(config_get_config_directory(CONFIG_ACTIVE_DIRECTORY));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment