- Patch #105937 by Gabor: fixed caching bug with enabling and disabling themes/modules. My last commit of the year ...

5.x
Dries Buytaert 2006-12-31 13:44:33 +00:00
parent 20907a8275
commit 7172ab6b8f
1 changed files with 3 additions and 6 deletions

View File

@ -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)) {