summaryrefslogtreecommitdiff
path: root/modules/aggregator
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-03-23 19:12:38 +0000
committerDries Buytaert <dries@buytaert.net>2003-03-23 19:12:38 +0000
commit9836201e7fced16dce3ea48653ad116369af4526 (patch)
tree35f0723e29ed6cb8cf98faaa4d254f11712bc9c6 /modules/aggregator
parent3b840abec8f1ceed9f0804ce973b10cf4ffcdde5 (diff)
downloadbrdo-9836201e7fced16dce3ea48653ad116369af4526.tar.gz
brdo-9836201e7fced16dce3ea48653ad116369af4526.tar.bz2
- Bugfix. Reported by Gunnar
Diffstat (limited to 'modules/aggregator')
-rw-r--r--modules/aggregator/aggregator.module11
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module
index a9255357a..8e6d96547 100644
--- a/modules/aggregator/aggregator.module
+++ b/modules/aggregator/aggregator.module
@@ -49,7 +49,8 @@ function import_link($type) {
}
function import_cron() {
- $result = db_query("SELECT * FROM feed WHERE timestamp + refresh < ". time());
+ // $result = db_query("SELECT * FROM feed WHERE timestamp + refresh < ". time());
+ $result = db_query("SELECT * FROM feed");
while ($feed = db_fetch_array($result)) {
import_refresh($feed);
}
@@ -215,9 +216,12 @@ function import_element_data($parser, $data) {
}
}
-
function import_refresh($feed) {
+ // unset the global variables before we use them:
+ unset($GLOBALS["channel"], $GLOBALS["element"], $GLOBALS["item"], $GLOBALS["items"], $GLOBALS["tag"]);
+
+ // after we unset the variables, we can global them again:
global $items, $channel;
/*
@@ -239,9 +243,6 @@ function import_refresh($feed) {
}
fclose($fp);
- // unset the global variables:
- unset($GLOBALS["channel"], $GLOBAL["element"], $GLOBALS["item"], $GLOBAL["items"]);
-
// parse the data:
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, "import_element_start", "import_element_end");