Index: node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node.module,v retrieving revision 1.519 diff -u -F^function -r1.519 node.module --- node.module 11 Aug 2005 12:53:39 -0000 1.519 +++ node.module 21 Aug 2005 15:38:01 -0000 @@ -758,14 +758,24 @@ function node_admin_nodes() { drupal_set_message(t('The items have been deleted.')); } else { - $extra = ''; + //back to the admin page if no list items present + if (count($list) == 0) { + drupal_goto('admin/node'); + } + $extra = theme_item_list($list); $extra .= form_hidden('operation', 'delete'); $output = theme('confirm', @@ -1588,7 +1598,13 @@ function node_delete($edit) { watchdog('content', t('%type: deleted %title.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title)))); } else { - $extra = form_hidden('nid', $node->nid); + $extras = node_invoke_nodeapi(&$node, 'delete pre'); + //check to see if any module has cancelled deletion for the node. if not, add extras + if (!in_array(FALSE, $extras)) { + $extra = form_hidden('nid', $node->nid) . implode('', $extras); + } else { + drupal_goto('node/'.$node->nid.'/edit'); + } $output = theme('confirm', t('Are you sure you want to delete %title?', array('%title' => theme('placeholder', $node->title))), $_GET['destination'] ? $_GET['destination'] : 'node/'. $node->nid,