diff options
author | Dries <dries@buytaert.net> | 2011-12-21 14:56:15 -0500 |
---|---|---|
committer | Dries <dries@buytaert.net> | 2011-12-21 14:56:15 -0500 |
commit | 7cf4dea7c6ed18a865c18d096d86b676753e2c37 (patch) | |
tree | 733e9a027d67821f621cb48cd884a272f072e931 /modules/aggregator | |
parent | 3ba39c132ff157c3e758ea42e861b92db2c19e7a (diff) | |
download | brdo-7cf4dea7c6ed18a865c18d096d86b676753e2c37.tar.gz brdo-7cf4dea7c6ed18a865c18d096d86b676753e2c37.tar.bz2 |
- Patch #1373360 by sun: fatal error if optional Block module is not enabled.
Diffstat (limited to 'modules/aggregator')
-rw-r--r-- | modules/aggregator/aggregator.module | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index eafb61ed3..9a78d971e 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -449,10 +449,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'; } @@ -511,10 +513,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') |