node_revision_revert_confirm

Versions
5
node_revision_revert_confirm($node)
6
node_revision_revert_confirm($form_state, $node_revision)
7
node_revision_revert_confirm($form, $form_state, $node_revision)

Ask for confirmation of the reversion to prevent against CSRF attacks.

Code

modules/node/node.pages.inc, line 571

<?php
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'));
}
?>
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.