Mercurial > defr > drupal > core
comparison modules/aggregator/aggregator.module @ 9:acef7ccb09b5 6.4
Drupal 6.4
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:32:08 +0100 |
parents | fff6d4c8c043 |
children | 3edae6ecd6c6 |
comparison
equal
deleted
inserted
replaced
8:85cbd6048071 | 9:acef7ccb09b5 |
---|---|
1 <?php | 1 <?php |
2 // $Id: aggregator.module,v 1.374.2.2 2008/07/05 05:57:33 dries Exp $ | 2 // $Id: aggregator.module,v 1.374.2.3 2008/08/08 20:10:01 dries Exp $ |
3 | 3 |
4 /** | 4 /** |
5 * @file | 5 * @file |
6 * Used to aggregate syndicated content (RSS, RDF, and Atom). | 6 * Used to aggregate syndicated content (RSS, RDF, and Atom). |
7 */ | 7 */ |
379 db_query("UPDATE {aggregator_category} SET title = '%s', description = '%s' WHERE cid = %d", $edit['title'], $edit['description'], $edit['cid']); | 379 db_query("UPDATE {aggregator_category} SET title = '%s', description = '%s' WHERE cid = %d", $edit['title'], $edit['description'], $edit['cid']); |
380 $op = 'update'; | 380 $op = 'update'; |
381 } | 381 } |
382 else { | 382 else { |
383 db_query('DELETE FROM {aggregator_category} WHERE cid = %d', $edit['cid']); | 383 db_query('DELETE FROM {aggregator_category} WHERE cid = %d', $edit['cid']); |
384 // Make sure there is no active block for this category. | |
385 db_query("DELETE FROM {blocks} WHERE module = '%s' AND delta = '%s'", 'aggregator', 'category-' . $edit['cid']); | |
384 $edit['title'] = ''; | 386 $edit['title'] = ''; |
385 $op = 'delete'; | 387 $op = 'delete'; |
386 } | 388 } |
387 } | 389 } |
388 else if (!empty($edit['title'])) { | 390 else if (!empty($edit['title'])) { |
419 if (!empty($items)) { | 421 if (!empty($items)) { |
420 db_query('DELETE FROM {aggregator_category_item} WHERE '. implode(' OR ', $items)); | 422 db_query('DELETE FROM {aggregator_category_item} WHERE '. implode(' OR ', $items)); |
421 } | 423 } |
422 db_query('DELETE FROM {aggregator_feed} WHERE fid = %d', $edit['fid']); | 424 db_query('DELETE FROM {aggregator_feed} WHERE fid = %d', $edit['fid']); |
423 db_query('DELETE FROM {aggregator_item} WHERE fid = %d', $edit['fid']); | 425 db_query('DELETE FROM {aggregator_item} WHERE fid = %d', $edit['fid']); |
426 // Make sure there is no active block for this feed. | |
427 db_query("DELETE FROM {blocks} WHERE module = '%s' AND delta = '%s'", 'aggregator', 'feed-' . $edit['fid']); | |
424 } | 428 } |
425 else if (!empty($edit['title'])) { | 429 else if (!empty($edit['title'])) { |
426 db_query("INSERT INTO {aggregator_feed} (title, url, refresh, block, description, image) VALUES ('%s', '%s', %d, 5, '', '')", $edit['title'], $edit['url'], $edit['refresh']); | 430 db_query("INSERT INTO {aggregator_feed} (title, url, refresh, block, description, image) VALUES ('%s', '%s', %d, 5, '', '')", $edit['title'], $edit['url'], $edit['refresh']); |
427 // A single unique id for bundles and feeds, to use in blocks. | 431 // A single unique id for bundles and feeds, to use in blocks. |
428 $edit['fid'] = db_last_insert_id('aggregator_feed', 'fid'); | 432 $edit['fid'] = db_last_insert_id('aggregator_feed', 'fid'); |