You are here

function block_box_delete_submit in Drupal 5

Same name and namespace in other branches
  1. 6 modules/block/block.admin.inc \block_box_delete_submit()

Deletion of custom blocks.

File

modules/block/block.module, line 535
Controls the boxes that are displayed around the main content.

Code

function block_box_delete_submit($form_id, $form_values) {
  db_query('DELETE FROM {boxes} WHERE bid = %d', $form_values['bid']);
  db_query("DELETE FROM {blocks} WHERE module = 'block' AND delta = '%s'", $form_values['bid']);
  drupal_set_message(t('The block %name has been removed.', array(
    '%name' => $form_values['info'],
  )));
  cache_clear_all();
  return 'admin/build/block';
}