You are here

function _quotes_block_delete in Quotes 6

Same name and namespace in other branches
  1. 5 quotes.module \_quotes_block_delete()
  2. 7 quotes.admin.inc \_quotes_block_delete()

Confirms the deletion a quote block.

Parameters

$bid: The block ID of the block being deleted.

Return value

A string containing the confirmation form displayed to the user.

1 string reference to '_quotes_block_delete'
quotes_menu in ./quotes.module
Implementation of hook_menu().

File

./quotes.admin.inc, line 378
The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.

Code

function _quotes_block_delete($form_stuff, $bid) {
  $block = db_fetch_object(db_query('SELECT qb.name FROM {quotes_blocks} qb WHERE qb.bid = %d', $bid));
  $form = array();
  $form['bid'] = array(
    '#type' => 'value',
    '#value' => $bid,
  );
  $form['block_name'] = array(
    '#type' => 'value',
    '#value' => $block->name,
  );
  return confirm_form($form, t('Are you sure you want to delete the block %name?', array(
    '%name' => $block->name,
  )), 'admin/settings/quotes/blocks', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}