Commit 9e2540ee authored by webchick's avatar webchick

#306316 by beeradb: Rebuild the menu from node_types_rebuild() to assist with...

#306316 by beeradb: Rebuild the menu from node_types_rebuild() to assist with programmatic node creation.
parent 3946b191
......@@ -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.
......
......@@ -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;
......
......@@ -499,6 +499,8 @@ function node_types_rebuild() {
}
_node_types_build();
// This is required for proper menu items at node/add/type.
menu_rebuild();
}
/**
......
......@@ -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();
......
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