Commit 5c504cef authored by Gábor Hojtsy's avatar Gábor Hojtsy

#193366 by chx: rebuild caches when displaying the module admin screen, to...

#193366 by chx: rebuild caches when displaying the module admin screen, to avoid stale data in registries when the submission is handled
parent 2f0657bc
......@@ -566,6 +566,10 @@ function _system_is_incompatible(&$incompatible, $files, $file) {
* The form array.
*/
function system_modules($form_state = array()) {
drupal_rebuild_theme_registry();
node_types_rebuild();
menu_rebuild();
cache_clear_all('schema', 'cache');
// Get current list of modules.
$files = module_rebuild_cache();
......@@ -864,10 +868,6 @@ function system_modules_submit($form, &$form_state) {
$current_module_list = module_list(TRUE, FALSE);
if ($old_module_list != $current_module_list) {
drupal_rebuild_theme_registry();
node_types_rebuild();
menu_rebuild();
cache_clear_all('schema', 'cache');
drupal_set_message(t('The configuration options have been saved.'));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment