summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/common.inc2
-rw-r--r--modules/node/content_types.inc2
-rw-r--r--modules/node/node.module2
-rw-r--r--modules/system/system.admin.inc1
4 files changed, 3 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 66d41bb9c..2ecf25069 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -4042,7 +4042,7 @@ function drupal_flush_all_caches() {
}
drupal_theme_rebuild();
- menu_rebuild();
+ // Rebuild content types, menu will be rebuilt as well.
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 3868c50f4..e3b0dea39 100644
--- a/modules/node/content_types.inc
+++ b/modules/node/content_types.inc
@@ -328,7 +328,6 @@ function node_type_form_submit($form, &$form_state) {
}
node_types_rebuild();
- menu_rebuild();
$t_args = array('%name' => $type->name);
if ($op == t('Reset to defaults')) {
@@ -413,7 +412,6 @@ 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/build/types';
return;
diff --git a/modules/node/node.module b/modules/node/node.module
index 25e10df99..63ac460ad 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -499,6 +499,8 @@ function node_types_rebuild() {
}
_node_types_build();
+ // 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 652197793..afe65919c 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -574,7 +574,6 @@ function system_modules($form_state = array()) {
registry_rebuild();
drupal_theme_rebuild();
node_types_rebuild();
- menu_rebuild();
cache_clear_all('schema', 'cache');
// Get current list of modules.
$files = module_rebuild_cache();