diff --git a/includes/common.inc b/includes/common.inc index 781e27a9c59af5bbd5f23c4d983ceb9d7bb8a286..ff0acc58f53777cd92e987e2bfc48d3967fa8ada 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -5221,7 +5221,7 @@ function drupal_flush_all_caches() { } drupal_theme_rebuild(); - // Rebuild content types, menu will be rebuilt as well. + menu_rebuild(); node_types_rebuild(); // Don't clear cache_form - in-progress form submissions may break. // Ordered so clearing the page cache will always be the last action. diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc index 2236090411b341abdc0ebc31ff79c0ba31b9eb58..8a5adaf93ba409ef5804dd6a25df337e319f4359 100644 --- a/modules/node/content_types.inc +++ b/modules/node/content_types.inc @@ -350,6 +350,7 @@ function node_type_form_submit($form, &$form_state) { } node_types_rebuild(); + menu_rebuild(); $t_args = array('%name' => $type->name); if ($status == SAVED_UPDATED) { @@ -444,6 +445,7 @@ function node_type_delete_confirm_submit($form, &$form_state) { watchdog('menu', 'Deleted content type %name.', $t_args, WATCHDOG_NOTICE); node_types_rebuild(); + menu_rebuild(); $form_state['redirect'] = 'admin/structure/types'; return; diff --git a/modules/node/node.module b/modules/node/node.module index 62c11ce835a86a1336c905ff40ebad523ada20f2..a9128ff885307a0d3cadd6f87470e2f33cfcd016 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -465,8 +465,6 @@ function node_types_rebuild() { // Reset cached node type information so that the next access // will use the updated data. node_type_clear(); - // This is required for proper menu items at node/add/type. - menu_rebuild(); } /** diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index 2d1875e746c222a25c0121c8f950eaeb5a22291e..bd7f54effdee0dd41b7f3a990948ff3bad704dae 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1000,6 +1000,7 @@ function system_modules_submit($form, &$form_state) { registry_rebuild(); drupal_theme_rebuild(); node_types_rebuild(); + menu_rebuild(); cache_clear_all('schema', 'cache'); cache_clear_all('entity_info', 'cache'); drupal_clear_css_cache();