Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.1033 diff -u -p -r1.1033 node.module --- modules/node/node.module 26 Mar 2009 13:31:25 -0000 1.1033 +++ modules/node/node.module 9 Apr 2009 17:28:16 -0000 @@ -1798,15 +1798,16 @@ function node_menu() { 'page arguments' => array('node_delete_confirm', 1), 'access callback' => 'node_access', 'access arguments' => array('delete', 1), - 'weight' => 1, - 'type' => MENU_CALLBACK); + 'weight' => 2, + 'type' => MENU_LOCAL_TASK + ); $items['node/%node/revisions'] = array( 'title' => 'Revisions', 'page callback' => 'node_revision_overview', 'page arguments' => array(1), 'access callback' => '_node_revision_access', 'access arguments' => array(1), - 'weight' => 2, + 'weight' => 3, 'type' => MENU_LOCAL_TASK, ); $items['node/%node/revisions/%/view'] = array( @@ -1944,7 +1945,7 @@ function node_feed($nids = FALSE, $chann $item->body = $content; unset($item->teaser); } - + // Allow modules to modify the fully-built node. node_invoke_node($item, 'alter', $teaser, FALSE); } Index: modules/node/node.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.pages.inc,v retrieving revision 1.58 diff -u -p -r1.58 node.pages.inc --- modules/node/node.pages.inc 26 Mar 2009 13:31:25 -0000 1.58 +++ modules/node/node.pages.inc 9 Apr 2009 17:28:17 -0000 @@ -8,7 +8,7 @@ /** - * Menu callback; presents the node editing form, or redirects to delete confirmation. + * Menu callback; presents the node editing form. */ function node_page_edit($node) { $type_name = node_get_types('name', $node); @@ -255,14 +255,6 @@ function node_form(&$form_state, $node) '#weight' => 10, '#submit' => array('node_form_build_preview'), ); - if (!empty($node->nid) && node_access('delete', $node)) { - $form['buttons']['delete'] = array( - '#type' => 'submit', - '#value' => t('Delete'), - '#weight' => 15, - '#submit' => array('node_form_delete_submit'), - ); - } $form['#validate'][] = 'node_form_validate'; $form['#theme'] = array($node->type . '_node_form', 'node_form'); @@ -314,20 +306,6 @@ function node_body_field(&$node, $label, return $form; } -/** - * Button submit function: handle the 'Delete' button on the node form. - */ -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); -} - - function node_form_build_preview($form, &$form_state) { $node = node_form_submit_build_node($form, $form_state); $form_state['node_preview'] = node_preview($node); @@ -495,9 +473,9 @@ function node_delete_confirm(&$form_stat ); return confirm_form($form, - t('Are you sure you want to delete %title?', array('%title' => $node->title)), + check_plain($node->title), isset($_GET['destination']) ? $_GET['destination'] : 'node/' . $node->nid, - t('This action cannot be undone.'), + t('Are you sure you want to delete this @type? This action cannot be undone.', array('@type' => node_get_types('name', $node))), t('Delete'), t('Cancel') ); @@ -518,8 +496,6 @@ function node_delete_confirm_submit($for * Generate an overview table of older revisions of a node. */ function node_revision_overview($node) { - drupal_set_title(t('Revisions for %title', array('%title' => $node->title)), PASS_THROUGH); - $header = array(t('Revision'), array('data' => t('Operations'), 'colspan' => 2)); $revisions = node_revision_list($node); @@ -564,7 +540,14 @@ function node_revision_overview($node) { */ function node_revision_revert_confirm($form_state, $node_revision) { $form['#node_revision'] = $node_revision; - return confirm_form($form, t('Are you sure you want to revert to the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/' . $node_revision->nid . '/revisions', '', t('Revert'), t('Cancel')); + return confirm_form( + $form, + check_plain($node_revision->title), + 'node/' . $node_revision->nid . '/revisions', + t('Are you sure you want to revert to the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), + t('Revert'), + t('Cancel') + ); } function node_revision_revert_confirm_submit($form, &$form_state) { @@ -584,7 +567,14 @@ function node_revision_revert_confirm_su function node_revision_delete_confirm($form_state, $node_revision) { $form['#node_revision'] = $node_revision; - return confirm_form($form, t('Are you sure you want to delete the revision from %revision-date?', array('%revision-date' => format_date($node_revision->revision_timestamp))), 'node/' . $node_revision->nid . '/revisions', t('This action cannot be undone.'), t('Delete'), t('Cancel')); + return confirm_form( + $form, + check_plain($node_revision->title), + 'node/' . $node_revision->nid . '/revisions', + t('Are you sure you want to delete the revision from %revision-date? This action cannot be undone.', array('%revision-date' => format_date($node_revision->revision_timestamp))), + t('Delete'), + t('Cancel') + ); } function node_revision_delete_confirm_submit($form, &$form_state) {