Skip to content
Snippets Groups Projects
Commit 5ba0c596 authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

#42514 by wtanaka and dopry. More thoroughly delete custom blocks.

parent 66fe517e
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -541,6 +541,7 @@ function block_box_delete($bid = 0) { ...@@ -541,6 +541,7 @@ function block_box_delete($bid = 0) {
*/ */
function block_box_delete_submit($form_id, $form_values) { function block_box_delete_submit($form_id, $form_values) {
db_query('DELETE FROM {boxes} WHERE bid = %d', $form_values['bid']); db_query('DELETE FROM {boxes} WHERE bid = %d', $form_values['bid']);
db_query("DELETE FROM {blocks} WHERE module = 'block' AND delta = %d", $form_values['bid']);
drupal_set_message(t('The block %name has been removed.', array('%name' => $form_values['info']))); drupal_set_message(t('The block %name has been removed.', array('%name' => $form_values['info'])));
cache_clear_all(); cache_clear_all();
return 'admin/build/block'; return 'admin/build/block';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment