function recipe_import_form_submit in Recipe 7.2
Same name and namespace in other branches
- 6 recipe.module \recipe_import_form_submit()
- 7 recipe.module \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.admin.inc - Page callback: Constructs a form for importing a single recipe.
File
- ./
recipe.admin.inc, line 223 - Contains admin page callbacks, form validation, and form submission handlers.
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'));
}
}