diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-01 18:37:23 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-01 18:37:23 +0000 |
commit | bf751d9a94dca1b48f30a061aa09049c977fbda1 (patch) | |
tree | 511a51fe8ae9f7675e5ea148ada52cc74e9f0d15 /includes | |
parent | 0223bf1dc25a77671618733ee7e76fba958013d8 (diff) | |
download | brdo-bf751d9a94dca1b48f30a061aa09049c977fbda1.tar.gz brdo-bf751d9a94dca1b48f30a061aa09049c977fbda1.tar.bz2 |
#651086 follow-up by carols8f: Fix cache clearing is an ineffective mess.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/common.inc | 3 | ||||
-rw-r--r-- | includes/install.core.inc | 13 | ||||
-rw-r--r-- | includes/module.inc | 4 | ||||
-rw-r--r-- | includes/update.inc | 3 |
4 files changed, 17 insertions, 6 deletions
diff --git a/includes/common.inc b/includes/common.inc index 0c3851411..8fda660e9 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -6544,6 +6544,9 @@ function drupal_flush_all_caches() { menu_rebuild(); node_types_rebuild(); + // Synchronize to catch any actions that were added or removed. + actions_synchronize(); + // Don't clear cache_form - in-progress form submissions may break. // Ordered so clearing the page cache will always be the last action. $core = array('cache', 'cache_filter', 'cache_bootstrap', 'cache_page'); 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()); @@ -1565,6 +1563,15 @@ function _install_module_batch($module, $module_name, &$context) { } /** + * '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. */ function install_check_requirements($install_state) { diff --git a/includes/module.inc b/includes/module.inc index f932b7f49..71b6a5551 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -67,7 +67,7 @@ function module_list($refresh = FALSE, $bootstrap = FALSE, $sort = FALSE, $fixed else { // As this is the $refresh case, make sure that system_list() returns // fresh data. - drupal_static_reset('system_list'); + system_list_reset(); if ($bootstrap) { $list = system_list('bootstrap'); } @@ -391,7 +391,6 @@ function module_enable($module_list, $enable_dependencies = TRUE) { ->condition('name', $module) ->execute(); // Refresh the module list to include it. - system_list_reset(); module_list(TRUE); module_implements('', FALSE, TRUE); _system_update_bootstrap_status(); @@ -498,7 +497,6 @@ function module_disable($module_list, $disable_dependents = TRUE) { if (!empty($invoke_modules)) { // Refresh the module list to exclude the disabled modules. - system_list_reset(); module_list(TRUE); module_implements('', FALSE, TRUE); // Invoke hook_modules_disabled before disabling modules, diff --git a/includes/update.inc b/includes/update.inc index ff7fc696c..51504a811 100644 --- a/includes/update.inc +++ b/includes/update.inc @@ -637,6 +637,9 @@ function update_fix_d7_requirements() { db_change_field('languages', 'javascript', 'javascript', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => '')); } + // Rename action description to label. + db_change_field('actions', 'description', 'label', array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => '0')); + variable_set('update_d7_requirements', TRUE); } |