You are here

function protected_pages_delete_confirm in Protected Pages 7

Same name and namespace in other branches
  1. 7.2 protected_pages.admin.inc \protected_pages_delete_confirm()

Callback function for delete protected page.

1 string reference to 'protected_pages_delete_confirm'
protected_pages_menu in ./protected_pages.module
Implements hook_menu().

File

./protected_pages.admin.inc, line 239
Provides page callbacks for configuration page.

Code

function protected_pages_delete_confirm($form, &$form_state, $pid) {
  $path = db_select('protected_pages')
    ->fields('protected_pages', array(
    'path',
  ))
    ->condition('pid', $pid)
    ->range(0, 1)
    ->execute()
    ->fetchField();
  $form['pid'] = array(
    '#type' => 'hidden',
    '#value' => $pid,
  );
  return confirm_form($form, t('Are you sure you want to delete <b>"%path"</b> from protected pages list?', array(
    '%path' => $path,
  )), 'admin/config/system/protected_pages', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}