You are here

function dynamic_banner_admin_delete_confirm in Dynamic Banner 7.2

Same name and namespace in other branches
  1. 6 includes/callbacks.inc \dynamic_banner_admin_delete_confirm()
  2. 7 includes/callbacks.inc \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

./dynamic_banner.module, line 861
Distributed under GNU GPL version 3

Code

function dynamic_banner_admin_delete_confirm($form, $form_state, $dbid) {
  $banner = dynamic_banner_load_banner($dbid);
  if (isset($banner) && !empty($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;
  }

  // Can't delete non existent banner.
  drupal_access_denied();
}