From fcb68d747e6b61e79da6afe573619720ba6baf80 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 7 Dec 2008 08:23:07 +0000 Subject: #305653 follow-up by sun: Prevent themes from being disabled during update. --- includes/common.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/includes/common.inc b/includes/common.inc index df5cb16a9..b8816147f 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -3950,7 +3950,16 @@ function drupal_flush_all_caches() { registry_rebuild(); drupal_clear_css_cache(); drupal_clear_js_cache(); - system_theme_data(); + + // If invoked from update.php, we must not update the theme information in the + // database, or this will result in all themes being disabled. + if (defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'update') { + _system_theme_data(); + } + else { + system_theme_data(); + } + drupal_theme_rebuild(); menu_rebuild(); node_types_rebuild(); -- cgit v1.2.3