Skip to content
Snippets Groups Projects
Commit 64117304 authored by Alex Barth's avatar Alex Barth
Browse files

#622932-30 mikl: fix remaining non-standard SQL.

parent 9426b2e6
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
Feeds 6.x 1.0 xxxxxxxxxxxxxxxxxxxx
----------------------------------
- #622932-30 mikl: fix remaining non-standard SQL.
- #624464 bangpound: Support tabs as delimiters.
Feeds 6.x 1.0 Alpha 14, 2010-04-11
......
......@@ -107,7 +107,7 @@ class FeedsScheduler implements FeedsSchedulerInterface {
foreach ($importer->getScheduleCallbacks() as $callback) {
$period = $importer->getSchedulePeriod($callback);
if ($period != FEEDS_SCHEDULE_NEVER) {
$result = db_query_range('SELECT feed_nid, id, callback, last_executed_time FROM {feeds_schedule} WHERE id = "%s" AND callback = "%s" AND scheduled = 0 AND (last_executed_time < %d OR last_executed_time = 0) ORDER BY last_executed_time ASC', $importer->id, $callback, FEEDS_REQUEST_TIME - $period, 0, $num);
$result = db_query_range("SELECT feed_nid, id, callback, last_executed_time FROM {feeds_schedule} WHERE id = '%s' AND callback = '%s' AND scheduled = 0 AND (last_executed_time < %d OR last_executed_time = 0) ORDER BY last_executed_time ASC", $importer->id, $callback, FEEDS_REQUEST_TIME - $period, 0, $num);
while ($job = db_fetch_array($result)) {
$this->schedule($job);
// @todo Add time limit.
......
......@@ -130,11 +130,11 @@ class FeedsNodeProcessor extends FeedsProcessor {
if ($time == FEEDS_EXPIRE_NEVER) {
return;
}
$result = db_query_range('SELECT n.nid FROM {node} n JOIN {feeds_node_item} fni ON n.nid = fni.nid WHERE fni.id = "%s" AND n.created < %d', $this->id, FEEDS_REQUEST_TIME - $time, 0, variable_get('feeds_node_batch_size', FEEDS_NODE_BATCH_SIZE));
$result = db_query_range("SELECT n.nid FROM {node} n JOIN {feeds_node_item} fni ON n.nid = fni.nid WHERE fni.id = '%s' AND n.created < %d", $this->id, FEEDS_REQUEST_TIME - $time, 0, variable_get('feeds_node_batch_size', FEEDS_NODE_BATCH_SIZE));
while ($node = db_fetch_object($result)) {
_feeds_node_delete($node->nid);
}
if (db_result(db_query_range('SELECT n.nid FROM {node} n JOIN {feeds_node_item} fni ON n.nid = fni.nid WHERE fni.id = "%s" AND n.created < %d', $this->id, FEEDS_REQUEST_TIME - $time, 0, 1))) {
if (db_result(db_query_range("SELECT n.nid FROM {node} n JOIN {feeds_node_item} fni ON n.nid = fni.nid WHERE fni.id = '%s' AND n.created < %d", $this->id, FEEDS_REQUEST_TIME - $time, 0, 1))) {
return FEEDS_BATCH_ACTIVE;
}
return FEEDS_BATCH_COMPLETE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment