From 7172ab6b8f274a170a19dd857e2f394bc23a70a3 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 31 Dec 2006 13:44:33 +0000 Subject: - Patch #105937 by Gabor: fixed caching bug with enabling and disabling themes/modules. My last commit of the year ... --- modules/system/system.module | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'modules/system/system.module') diff --git a/modules/system/system.module b/modules/system/system.module index a8ddbff38..9f97e553c 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -1195,10 +1195,7 @@ function system_themes_submit($form_id, $form_values) { foreach ($form_values['status'] as $key => $choice) { // Always enable the default theme, despite its status checkbox being checked: if ($choice || $form_values['theme_default'] == $key) { - // If theme status is being set to 1 from 0, initialize block data for this theme if necessary. - if (db_num_rows(db_query("SELECT status FROM {system} WHERE type = 'theme' AND name = '%s' AND status = 0", $key))) { - system_initialize_theme_blocks($key); - } + system_initialize_theme_blocks($key); db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' and name = '%s'", $key); } } @@ -1474,6 +1471,8 @@ function system_modules_submit($form_id, $form_values) { } } + $old_module_list = module_list(); + if (!empty($enable_modules)) { module_enable($enable_modules); } @@ -1481,8 +1480,6 @@ function system_modules_submit($form_id, $form_values) { module_disable($disable_modules); } - $old_module_list = module_list(); - // Install new modules. foreach ($new_modules as $key => $module) { if (!drupal_check_module($module)) { -- cgit v1.2.3