function node_form_delete_submit

7.x node.pages.inc node_form_delete_submit($form, &$form_state)
6.x node.pages.inc node_form_delete_submit($form, &$form_state)

Button sumit function: handle the 'Delete' button on the node form.

1 string reference to 'node_form_delete_submit'
node_form in drupal-6.x/modules/node/node.pages.inc
Generate the node add/edit form array.

File

drupal-6.x/modules/node/node.pages.inc, line 308
Page callbacks for adding, editing, deleting, and revisions management for content.

Code

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