- Patch #586436 by Amitaibu: execute node_type_save() after variable_set().

merge-requests/26/head
Dries Buytaert 2009-10-14 01:01:54 +00:00
parent 04d0ef5c8c
commit b6164a4cb7
1 changed files with 6 additions and 4 deletions

View File

@ -323,8 +323,6 @@ function node_type_form_submit($form, &$form_state) {
return;
}
$status = node_type_save($type);
$variables = $form_state['values'];
// Remove everything that's been saved already - whatever's left is assumed
@ -352,6 +350,10 @@ function node_type_form_submit($form, &$form_state) {
}
}
// Saving the content type after saving the variables allows modules to act
// on those variables via hook_node_type_insert().
$status = node_type_save($type);
node_types_rebuild();
menu_rebuild();
$t_args = array('%name' => $type->name);