$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);
@@ -130,11 +130,11 @@ class FeedsNodeProcessor extends FeedsProcessor {
...
@@ -130,11 +130,11 @@ class FeedsNodeProcessor extends FeedsProcessor {
if($time==FEEDS_EXPIRE_NEVER){
if($time==FEEDS_EXPIRE_NEVER){
return;
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)){
while($node=db_fetch_object($result)){
_feeds_node_delete($node->nid);
_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))){