You are here

function recipe_import_form_submit in Recipe 6

Same name and namespace in other branches
  1. 7.2 recipe.admin.inc \recipe_import_form_submit()
  2. 7 recipe.module \recipe_import_form_submit()

Submit handler for the single recipe import form.

1 string reference to 'recipe_import_form_submit'
recipe_import_form in ./recipe.module
Form recipe_import_form

File

./recipe.module, line 1493
recipe.module - share recipes

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'));
  }
}