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.')); }