You are here

function configuration_check_configurations in Configuration Management 7

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 CONFIGURATION_DATASTORE_OVERRIDDEN

4 calls to configuration_check_configurations()
configuration_check_configurations_submit in ./configuration.admin.inc
configuration_get_configuration in ./configuration.module
Retrieve configurations that are being tracked
configuration_revert_image_style in observers/observer.image.inc
Restore the values from the datastore when an image style is reverted.
image_configuration_revert in includes/configuration.image.inc
Implements hook_configuration_revert().

File

./configuration.module, line 925
Module file for the configuration module, which enables the capture and management of configuration in Drupal.

Code

function configuration_check_configurations($reset = FALSE) {
  if ($reset) {
    cache_clear_all('config_export', 'cache');
  }
  module_load_include('inc', 'configuration', 'configuration.export');
  configuration_include();
  $config = configuration_get_configuration();
  foreach ($config as $component => $info) {
    if (is_array($info)) {

      // Process the rest of configurations individually
      foreach ($info as $name => $settings) {
        $function = "configuration_check_{$component}";
        if (function_exists($function)) {
          call_user_func_array($function, array(
            $name,
          ));
        }
        else {
          drupal_set_message(t('Unable to process %component. You may have an unmet dependency. Enable the required modules to track this component.', array(
            '%component' => $component,
          )), 'warning', FALSE);
        }
      }
    }
  }
  if ($reset) {
    _configuration_write_export_table();
    cache_clear_all('config_export', 'cache');
  }
  configuration_find_new();
}