You are here

function node_page_edit in Drupal 5

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

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

1 string reference to 'node_page_edit'
node_menu in modules/node/node.module
Implementation of hook_menu().

File

modules/node/node.module, line 2527
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

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