Skip to content
Snippets Groups Projects
Commit 625e4de6 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #1373360 by sun: fatal error if optional Block module is not enabled.

parent c9e40d59
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
......@@ -456,10 +456,12 @@ function aggregator_save_category($edit) {
->condition('cid', $edit['cid'])
->execute();
// Make sure there is no active block for this category.
db_delete('block')
->condition('module', 'aggregator')
->condition('delta', 'category-' . $edit['cid'])
->execute();
if (module_exists('block')) {
db_delete('block')
->condition('module', 'aggregator')
->condition('delta', 'category-' . $edit['cid'])
->execute();
}
$edit['title'] = '';
$op = 'delete';
}
......@@ -521,10 +523,12 @@ function aggregator_save_feed($edit) {
->condition('fid', $edit['fid'])
->execute();
// Make sure there is no active block for this feed.
db_delete('block')
->condition('module', 'aggregator')
->condition('delta', 'feed-' . $edit['fid'])
->execute();
if (module_exists('block')) {
db_delete('block')
->condition('module', 'aggregator')
->condition('delta', 'feed-' . $edit['fid'])
->execute();
}
}
elseif (!empty($edit['title'])) {
$edit['fid'] = db_insert('aggregator_feed')
......
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