function node_form_delete_submit

Form submission handler for node_form().

Handles the 'Delete' button on the node form.

See also

node_form()

node_form_validate()

1 string reference to 'node_form_delete_submit'
node_form in drupal/modules/node/node.pages.inc
Form constructor for the node add/edit form.

File

drupal/modules/node/node.pages.inc, line 338
Page callbacks for adding, editing, deleting, and revisions management for content.

Code

function node_form_delete_submit($form, &$form_state) {
  $destination = array();
  if (isset($_GET['destination'])) {
    $destination = drupal_get_destination();
    unset($_GET['destination']);
  }
  $node = $form['#node'];
  $form_state['redirect'] = array(
    'node/' . $node->nid . '/delete',
    array(
      'query' => $destination,
    ),
  );
}