You are here

function _quotes_block_delete_submit in Quotes 6

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

Deletes the specified block.

@result A string specifying the page to which the user should be redirected (admin/settings/quotes/blocks).

Parameters

$form: The string specifying the form ID of the form that was submitted.

$form_state: The array specifying the form values.

File

./quotes.admin.inc, line 406
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_submit($form, &$form_state) {
  db_query("DELETE FROM {quotes_blocks} WHERE bid = %d", $form_state['values']['bid']);
  drupal_set_message(t('The block %name has been removed.', array(
    '%name' => $form_state['values']['block_name'],
  )));
  cache_clear_all();
  $form_state['redirect'] = 'admin/settings/quotes/blocks';
  return;
}