diff --git a/includes/module.inc b/includes/module.inc index fe2a980..b47b19c 100644 --- a/includes/module.inc +++ b/includes/module.inc @@ -452,6 +452,8 @@ function module_enable($module_list, $enable_dependencies = TRUE) { registry_update(); // Refresh the schema to include it. drupal_get_schema(NULL, TRUE); + // Clear all static caches so contrib-modules behave. + drupal_static_reset(); // Update the theme registry to include it. drupal_theme_rebuild(); // Clear entity cache. @@ -574,6 +576,8 @@ function module_disable($module_list, $disable_dependents = TRUE) { module_invoke_all('modules_disabled', $invoke_modules); // Update the registry to remove the newly-disabled module. registry_update(); + // Clear all static caches so contrib-modules behave. + drupal_static_reset(); _system_update_bootstrap_status(); // Update the theme registry to remove the newly-disabled module. drupal_theme_rebuild();