Commit 625e4de6 authored by Dries's avatar Dries

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

parent c9e40d59
......@@ -456,10 +456,12 @@ function aggregator_save_category($edit) {
->condition('cid', $edit['cid'])
->execute();
// Make sure there is no active block for this category.
if (module_exists('block')) {
db_delete('block')
->condition('module', 'aggregator')
->condition('delta', 'category-' . $edit['cid'])
->execute();
}
$edit['title'] = '';
$op = 'delete';
}
......@@ -521,11 +523,13 @@ function aggregator_save_feed($edit) {
->condition('fid', $edit['fid'])
->execute();
// Make sure there is no active block for this feed.
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')
->fields(array(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment