function block_custom_block_delete_submit
Form submission handler for block_custom_block_delete().
See also
Archivo
- drupal-7.x/
modules/ block/ block.admin.inc, line 635 - Admin page callbacks for the block module.
Código
function block_custom_block_delete_submit($form, &$form_state) {
db_delete('block_custom')->condition('bid', $form_state['values']['bid'])->execute();
db_delete('block')->condition('module', 'block')->condition('delta', $form_state['values']['bid'])->execute();
db_delete('block_role')->condition('module', 'block')->condition('delta', $form_state['values']['bid'])->execute();
drupal_set_message(t('The block %name has been removed.', array('%name' => $form_state['values']['info'])));
cache_clear_all();
$form_state['redirect'] = 'admin/structure/block';
return;
}