summaryrefslogtreecommitdiff
path: root/modules/aggregator/aggregator.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-08-12 16:12:00 +0000
committerDries Buytaert <dries@buytaert.net>2007-08-12 16:12:00 +0000
commitc17499b6fe5e9b388d09151d2c3525976fde065c (patch)
tree0203a1d7f6cbeba58fc2056ae4f6c6caa30119d0 /modules/aggregator/aggregator.module
parentb134b023e11902ceae12f3ab861da1f0a2fdbdbd (diff)
downloadbrdo-c17499b6fe5e9b388d09151d2c3525976fde065c.tar.gz
brdo-c17499b6fe5e9b388d09151d2c3525976fde065c.tar.bz2
- Patch #163191 by hswong3i: removed db_num_rows() for compatibility with Oracle and DB2. Also a performance improvement. (Correct version this time.)
Diffstat (limited to 'modules/aggregator/aggregator.module')
-rw-r--r--modules/aggregator/aggregator.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index 3fc060fc7..d6cf89923 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -964,10 +964,12 @@ function aggregator_parse_feed(&$data, $feed) {
$result = db_query('SELECT iid FROM {aggregator_item} WHERE fid = %d AND timestamp < %d', $feed['fid'], $age);
$items = array();
+ $num_rows = FALSE;
while ($item = db_fetch_object($result)) {
$items[] = $item->iid;
+ $num_rows = TRUE;
}
- if ($item) {
+ if ($num_rows) {
db_query('DELETE FROM {aggregator_category_item} WHERE iid IN ('. implode(', ', $items) .')');
db_query('DELETE FROM {aggregator_item} WHERE fid = %d AND timestamp < %d', $feed['fid'], $age);
}