You are here

function block_box_delete_submit in Drupal 6

Same name and namespace in other branches
  1. 5 modules/block/block.module \block_box_delete_submit()

Deletion of custom blocks.

File

modules/block/block.admin.inc, line 339
Admin page callbacks for the block module.

Code

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