From bf751d9a94dca1b48f30a061aa09049c977fbda1 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Fri, 1 Oct 2010 18:37:23 +0000 Subject: #651086 follow-up by carols8f: Fix cache clearing is an ineffective mess. --- includes/install.core.inc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'includes/install.core.inc') diff --git a/includes/install.core.inc b/includes/install.core.inc index 60ab8e60f..9cbfd059c 100644 --- a/includes/install.core.inc +++ b/includes/install.core.inc @@ -1403,6 +1403,7 @@ function install_profile_modules(&$install_state) { 'operations' => $operations, 'title' => st('Installing @drupal', array('@drupal' => drupal_install_profile_distribution_name())), 'error_message' => st('The installation has encountered an error.'), + 'finished' => '_install_profile_modules_finished', ); return $batch; } @@ -1527,9 +1528,6 @@ function install_finished(&$install_state) { // registered by the install profile are registered correctly. drupal_flush_all_caches(); - // Register actions declared by any modules. - actions_synchronize(); - // Remember the profile which was used. variable_set('install_profile', drupal_get_profile()); @@ -1564,6 +1562,15 @@ function _install_module_batch($module, $module_name, &$context) { $context['message'] = st('Installed %module module.', array('%module' => $module_name)); } +/** + * 'Finished' callback for module installation batch. + */ +function _install_profile_modules_finished($success, $results, $operations) { + // Flush all caches to complete the module installation process. Subsequent + // installation tasks will now have full access to the profile's modules. + drupal_flush_all_caches(); +} + /** * Checks installation requirements and reports any errors. */ -- cgit v1.2.3