diff --git a/core/includes/config.inc b/core/includes/config.inc index aa7e3a8..323cd95 100644 --- a/core/includes/config.inc +++ b/core/includes/config.inc @@ -111,12 +111,15 @@ function config_sync() { return; } - $lock_name = __FUNCTION__; - if (!lock_acquire($lock_name)) { + if (!lock_acquire(__FUNCTION__)) { // Another request is synchronizing configuration. Wait for it to complete, - // then re-check for any remaining differences. - lock_wait($lock_name); - return config_sync(); + // then return a negative result for UI purposes. We do not make a + // difference between an actual synchronization error and a failed lock, + // because a concurrent request synchronizing configuration is an edge-case + // in the first place and would mean that more than one developer or + // site builder attempts to do it without coordinating with others. + lock_wait(__FUNCTION__); + return FALSE; } try { @@ -128,10 +131,10 @@ function config_sync() { catch (ConfigException $e) { watchdog_exception('config_sync', $e); config_sync_invoke_sync_error_hooks($config_changes); - lock_release($lock_name); + lock_release(__FUNCTION__); return FALSE; } - lock_release($lock_name); + lock_release(__FUNCTION__); return TRUE; } diff --git a/core/modules/config/config.admin.inc b/core/modules/config/config.admin.inc index 1169bc0..48aa5fa 100644 --- a/core/modules/config/config.admin.inc +++ b/core/modules/config/config.admin.inc @@ -15,7 +15,7 @@ function config_admin_import_form($form, &$form_state) { if (empty($config_changes)) { $form['no_changes'] = array( - '#markup' => 'There are no changes on disk to reload.' + '#markup' => t('There are no configuration changes.'), ); return $form; } @@ -49,10 +49,10 @@ function config_admin_import_form($form, &$form_state) { */ function config_admin_import_form_submit($form, &$form_state) { if (config_sync()) { - drupal_set_message('Configuration successfully reloaded from disk.'); + drupal_set_message(t('The configuration was imported successfully.')); } else { - drupal_set_message('There was an error reloading configuration from disk.', 'error'); + drupal_set_message(t('The import failed due to an error. Any errors have been logged.'), 'error'); } }