function node_delete_confirm_submit
Same name and namespace in other branches
- 6.x drupal-6.x/modules/node/node.pages.inc \node_delete_confirm_submit()
Executes node deletion.
See also
Archivo
- drupal-7.x/
modules/ node/ node.pages.inc, line 541 - Page callbacks for adding, editing, deleting, and revisions management for content.
Código
function node_delete_confirm_submit($form, &$form_state) {
if ($form_state['values']['confirm']) {
$node = node_load($form_state['values']['nid']);
node_delete($form_state['values']['nid']);
watchdog('content', '@type: deleted %title.', array('@type' => $node->type, '%title' => $node->title));
drupal_set_message(t('@type %title has been deleted.', array('@type' => node_type_get_name($node), '%title' => $node->title)));
}
$form_state['redirect'] = '<front>';
}