function encrypt_get_default_config in Encrypt 7.3
Same name and namespace in other branches
- 7.2 encrypt.module \encrypt_get_default_config()
Get the default configuration.
Parameters
bool $reset: A flag to force the configuration to be retrieved from the database.
Return value
array An array with details for the default configuration.
6 calls to encrypt_get_default_config()
- EncryptConfigTest::testConfigEncrypt in ./
encrypt.test - Test an encryption with just a configuration.
- EncryptConfigTest::testConfigInstall in ./
encrypt.test - Test that the configuration table was created on install.
- EncryptConfigTest::testConfigManage in ./
encrypt.test - Test configuration management.
- encrypt_get_encryption_method in ./
encrypt.module - Fetch metadata on a specific encryption method plugin.
- encrypt_get_key_provider in ./
encrypt.module - Fetch metadata on a specific key provider plugin.
File
- ./
encrypt.module, line 310 - Main Encrypt Drupal File
Code
function encrypt_get_default_config($reset = FALSE) {
static $default_config = array();
if (!$default_config || $reset) {
$default_config = variable_get('encrypt_default_config', NULL);
$default_config = encrypt_get_config($default_config);
// For backward compatibility.
if (empty($default_config)) {
$method = variable_get('encrypt_encryption_method', 'default');
$provider = variable_get('encrypt_key_provider', 'drupal_private_key');
$settings_variable = 'encrypt_key_providers_' . $provider . '_settings';
$provider_settings = variable_get($settings_variable, array());
$default_config = array(
'method' => $method,
'method_settings' => NULL,
'provider' => $provider,
'provider_settings' => $provider_settings,
);
}
}
return $default_config;
}