From 5c504cef288858235eae2436149e25fdcfc24f89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Fri, 23 Nov 2007 15:36:44 +0000 Subject: [PATCH] #193366 by chx: rebuild caches when displaying the module admin screen, to avoid stale data in registries when the submission is handled --- modules/system/system.admin.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 887bd92ba54..ee89a2db4d0 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -566,6 +566,10 @@ function _system_is_incompatible(&$incompatible, $files, $file) { * The form array. */ function system_modules($form_state = array()) { + drupal_rebuild_theme_registry(); + node_types_rebuild(); + menu_rebuild(); + cache_clear_all('schema', 'cache'); // Get current list of modules. $files = module_rebuild_cache(); @@ -864,10 +868,6 @@ function system_modules_submit($form, &$form_state) { $current_module_list = module_list(TRUE, FALSE); if ($old_module_list != $current_module_list) { - drupal_rebuild_theme_registry(); - node_types_rebuild(); - menu_rebuild(); - cache_clear_all('schema', 'cache'); drupal_set_message(t('The configuration options have been saved.')); }