function recipe_import_form_submit in Recipe 7
Same name and namespace in other branches
- 6 recipe.module \recipe_import_form_submit()
- 7.2 recipe.admin.inc \recipe_import_form_submit()
Form submission handler for recipe_import_form().
See also
1 string reference to 'recipe_import_form_submit'
- recipe_import_form in ./
recipe.module - Page callback: Constructs a form for importing a single recipe.
File
- ./
recipe.module, line 1576 - Contains functions for Recipe node CRUD and display.
Code
function recipe_import_form_submit($form, &$form_state) {
global $user;
$parsed_recipe_object = recipe_import_parse($form, $form_state);
if (($node = recipe_import_get_node($parsed_recipe_object)) != FALSE) {
node_save($node);
$form_state['redirect'] = 'node/' . $node->nid . '/edit';
drupal_set_message(t('Recipe Imported'));
}
}