function locale_config_batch_finished

Finishes callback of system page locale import batch.

Parameters

bool $success: Information about the success of the batch import.

array $results: Information about the results of the batch import.

See also

locale_config_batch_build()

1 call to locale_config_batch_finished()
locale_translate_batch_finished in drupal/core/modules/locale/locale.bulk.inc
Finished callback of system page locale import batch.
1 string reference to 'locale_config_batch_finished'
locale_config_batch_build in drupal/core/modules/locale/locale.bulk.inc
Creates a locale batch to refresh specific configuration.

File

drupal/core/modules/locale/locale.bulk.inc, line 837
Mass import-export and batch import functionality for Gettext .po files.

Code

function locale_config_batch_finished($success, array $results) {
  if ($success) {
    $configuration = isset($results['stats']['config']) ? $results['stats']['config'] : 0;
    if ($configuration) {
      drupal_set_message(t('The configuration was successfully updated. There are %number configuration objects updated.', array(
        '%number' => $configuration,
      )));
      watchdog('locale', 'The configuration was successfully updated. %number configuration objects updated.', array(
        '%number' => $configuration,
      ));
    }
    else {
      drupal_set_message(t('No configuration objects have been updated.'));
      watchdog('locale', 'No configuration objects have been updated.', array(), WATCHDOG_WARNING);
    }
  }
}