node_page_edit

Versions
5 – 7
node_page_edit($node)

Menu callback; presents the node editing form, or redirects to delete confirmation.

Code

modules/node/node.module, line 2527

<?php
function node_page_edit($node) {
  if ($_POST['op'] == t('Delete')) {
    // Note: we redirect from node/nid/edit to node/nid/delete to make the tabs disappear.
    if ($_REQUEST['destination']) {
      $destination = drupal_get_destination();
      unset($_REQUEST['destination']);
    }
    drupal_goto('node/'. $node->nid .'/delete', $destination);
  }

  drupal_set_title(check_plain($node->title));
  return drupal_get_form($node->type .'_node_form', $node);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.