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

merge-requests/26/head
Angie Byron 2009-01-22 05:01:39 +00:00
parent 3946b191a9
commit 9e2540eeb2
4 changed files with 3 additions and 4 deletions

View File

@ -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.

View File

@ -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;

View File

@ -499,6 +499,8 @@ function node_types_rebuild() {
}
_node_types_build();
// This is required for proper menu items at node/add/type.
menu_rebuild();
}
/**

View File

@ -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();