node_page_edit

5 node.module node_page_edit($node)
6 node.pages.inc node_page_edit($node)
7 node.pages.inc node_page_edit($node)
8 node.pages.inc node_page_edit($node)

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

1 string reference to 'node_page_edit'

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);
}
Login or register to post comments