- Patch #268491 by mustafu, pwolanin, et al: fixed notice after deleting aggregator feed.
parent
92eda80f3a
commit
ab5cdfda61
|
@ -375,6 +375,8 @@ function aggregator_save_category($edit) {
|
|||
}
|
||||
else {
|
||||
db_query('DELETE FROM {aggregator_category} WHERE cid = %d', $edit['cid']);
|
||||
// Make sure there is no active block for this category.
|
||||
db_query("DELETE FROM {blocks} WHERE module = '%s' AND delta = '%s'", 'aggregator', 'category-' . $edit['cid']);
|
||||
$edit['title'] = '';
|
||||
$op = 'delete';
|
||||
}
|
||||
|
@ -415,6 +417,8 @@ function aggregator_save_feed($edit) {
|
|||
}
|
||||
db_query('DELETE FROM {aggregator_feed} WHERE fid = %d', $edit['fid']);
|
||||
db_query('DELETE FROM {aggregator_item} WHERE fid = %d', $edit['fid']);
|
||||
// Make sure there is no active block for this feed.
|
||||
db_query("DELETE FROM {blocks} WHERE module = '%s' AND delta = '%s'", 'aggregator', 'feed-' . $edit['fid']);
|
||||
}
|
||||
elseif (!empty($edit['title'])) {
|
||||
db_query("INSERT INTO {aggregator_feed} (title, url, refresh, block, description, image) VALUES ('%s', '%s', %d, 5, '', '')", $edit['title'], $edit['url'], $edit['refresh']);
|
||||
|
|
Loading…
Reference in New Issue