- Patch #268491 by mustafu, pwolanin, et al: fixed notice after deleting aggregator feed.

merge-requests/26/head
Dries Buytaert 2008-08-08 20:09:22 +00:00
parent 92eda80f3a
commit ab5cdfda61
1 changed files with 4 additions and 0 deletions

View File

@ -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']);