function node_revision_delete_confirm in Drupal 5
Same name and namespace in other branches
- 6 modules/node/node.pages.inc \node_revision_delete_confirm()
- 7 modules/node/node.pages.inc \node_revision_delete_confirm()
Ask confirmation for revision deletion to prevent against CSRF attacks.
1 string reference to 'node_revision_delete_confirm'
- node_revision_delete in modules/
node/ node.module - Delete the revision with specified revision number. A "delete revision" nodeapi event is invoked when a revision is deleted.
File
- modules/
node/ node.module, line 1840 - 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_revision_delete_confirm($node) {
$form['node'] = array(
'#type' => 'value',
'#value' => $node,
);
return confirm_form($form, t('Are you sure you want to delete the revision from %revision-date?', array(
'%revision-date' => format_date($node->revision_timestamp),
)), 'node/' . $node->nid . '/revisions', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}