You are here

function nodewords_edit_submit_save in Nodewords: D6 Meta Tags 6.2

'Save meta tag' submit handler.

1 string reference to 'nodewords_edit_submit_save'
nodewords_edit in ./nodewords.admin.inc
Edit the basics of a meta tag.

File

./nodewords.admin.inc, line 169
Administration forms.

Code

function nodewords_edit_submit_save($form, &$form_state) {
  $form_values = $form_state['values'];
  if (isset($form_values['tagid']) && is_numeric($form_values['tagid'])) {
    $tagid = _nodewords_db_update_tag($form_values);
    drupal_set_message(t('Updated %tag_name meta tag.', array(
      '%tag_name' => $form_values['name'],
    )));
  }
  else {
    $tagid = _nodewords_db_insert_tag($form_values);
    drupal_set_message(t('Created new %tag_name meta tag.', array(
      '%tag_name' => $form_values['name'],
    )));
  }
  $form_state['redirect'] = 'admin/content/nodewords/' . $tagid;
  $form_state['tagid'] = $tagid;
}