You are here

function dynamic_banner_admin_delete_confirm in Dynamic Banner 7

Same name and namespace in other branches
  1. 6 includes/callbacks.inc \dynamic_banner_admin_delete_confirm()
  2. 7.2 dynamic_banner.module \dynamic_banner_admin_delete_confirm()
  3. 8.x dynamic_banner.module \dynamic_banner_admin_delete_confirm()

Menu callback; confirms deleting a Banner

1 string reference to 'dynamic_banner_admin_delete_confirm'
dynamic_banner_menu in ./dynamic_banner.module
Implements hook_menu(). it is key to note here access arguments is referring to permissions

File

includes/callbacks.inc, line 701
Dynamic Banner Admin Pages and various other functions to make them work Most of the code in this file was derived from path module

Code

function dynamic_banner_admin_delete_confirm($form, $form_state) {

  // the last part of the url
  $dbid = arg(4);
  $banner = dynamic_banner_load_banner($dbid);
  if (user_access('administer dynamic_banner')) {
    $form['dbid'] = array(
      '#type' => 'hidden',
      '#value' => $dbid,
    );
    $output = confirm_form($form, t('Are you sure you want to delete banner %title?', array(
      '%title' => $banner->path,
    )), isset($_GET['destination']) ? $_GET['destination'] : 'admin/structure/banners');
  }
  return $output;
}