From 6f6db7429616ec5ec968f1151ec2ebf8ddc1bddd Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Tue, 27 Apr 2010 12:59:16 +0000 Subject: [PATCH] - Patch #683988 by catch, dww, aspilicious: failure to clear the system_list() entry from {cache_bootstrap()} results in bogus results when you upgrade a module. --- modules/system/system.admin.inc | 1 - modules/system/system.module | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 277fc3d70a3b..cba2e3a34368 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1240,7 +1240,6 @@ function system_modules_submit($form, &$form_state) { registry_rebuild(); system_rebuild_theme_data(); drupal_theme_rebuild(); - cache_clear_all('system_list', 'cache_bootstrap'); node_types_rebuild(); menu_rebuild(); cache_clear_all('schema', 'cache'); diff --git a/modules/system/system.module b/modules/system/system.module index a33807dfddf2..6947c0150587 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -2173,6 +2173,11 @@ function system_update_files_database(&$files, $type) { } } $query->execute(); + + // If any module or theme was moved to a new location, we need to reset the + // system_list() cache or we will continue to load the old copy, look for + // schema updates in the wrong place, etc. + system_list_reset(); } /** -- GitLab