You are here

function node_form_delete_submit in Drupal 6

Same name and namespace in other branches
  1. 7 modules/node/node.pages.inc \node_form_delete_submit()

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

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

File

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