You are here

function profile2_revision_revert_confirm in Profile 2 7.2

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

2 string references to 'profile2_revision_revert_confirm'
profile2_page_menu in contrib/profile2_page.module
Implements hook_menu().
profile2_tab_get_revision_revert in ./profile2.revisions.inc

File

./profile2.module, line 1626
Support for configurable user profiles.

Code

function profile2_revision_revert_confirm($form, $form_state, $profile_revision) {
  $form['#profile_revision'] = $profile_revision;
  $cancel_path = _profile2_revision_base_path($profile_revision);
  return confirm_form($form, t('Are you sure you want to revert to the revision from %date?', array(
    '%date' => format_date($profile_revision->revision_timestamp),
  )), $cancel_path, '', t('Revert'), t('Cancel'));
}