function configuration_find_new in Configuration Management 7
Look for any configurations that might be new
1 call to configuration_find_new()
- configuration_check_configurations in ./
configuration.module - Check each configuration that is being tracked and determine if anything has been overridden. Not able to just run a diff on an entire file because we need to know which specific configurations are out of sync. Log any results as…
File
- ./
configuration.module, line 1027 - Module file for the configuration module, which enables the capture and management of configuration in Drupal.
Code
function configuration_find_new() {
static $identifiers = array();
$config = configuration_get_configuration();
// Load all the files
configuration_include_defaults();
$components = configuration_get_components();
unset($components['ctools']);
foreach ($components as $component => $info) {
$function = "configuration_{$info['default_hook']}";
if (function_exists($function)) {
$code = call_user_func($function);
if (is_array($code)) {
foreach (array_keys($code) as $name) {
if (!in_array($name, $identifiers) && (!isset($config[$component]) || !in_array($name, array_keys($config[$component])))) {
$identifiers[] = $name;
configuration_add_status($component, $name, md5(serialize($code[$name])));
}
}
}
}
}
}