Commit c09f60c2 authored by Dries's avatar Dries

- Fixed bug in cron function of import.module: headlines did not expire

  properly.
parent 445d821d
......@@ -10,7 +10,7 @@ function import_cron() {
$result = db_query("SELECT * FROM feed");
while ($feed = db_fetch_array($result)) {
// remove expired items:
db_query("DELETE FROM item WHERE fid = '$feed[fid]' AND timestamp - ". time() ." > $feed[uncache]");
db_query("DELETE FROM item WHERE fid = '$feed[fid]' AND timstamp < ". (time() - $feed[uncache]));
// update feeds:
if ($feed[timestamp] + $feed[refresh] < time()) import_update($feed);
......
......@@ -10,7 +10,7 @@ function import_cron() {
$result = db_query("SELECT * FROM feed");
while ($feed = db_fetch_array($result)) {
// remove expired items:
db_query("DELETE FROM item WHERE fid = '$feed[fid]' AND timestamp - ". time() ." > $feed[uncache]");
db_query("DELETE FROM item WHERE fid = '$feed[fid]' AND timstamp < ". (time() - $feed[uncache]));
// update feeds:
if ($feed[timestamp] + $feed[refresh] < time()) import_update($feed);
......
......@@ -10,7 +10,7 @@ function import_cron() {
$result = db_query("SELECT * FROM feed");
while ($feed = db_fetch_array($result)) {
// remove expired items:
db_query("DELETE FROM item WHERE fid = '$feed[fid]' AND timestamp - ". time() ." > $feed[uncache]");
db_query("DELETE FROM item WHERE fid = '$feed[fid]' AND timstamp < ". (time() - $feed[uncache]));
// update feeds:
if ($feed[timestamp] + $feed[refresh] < time()) import_update($feed);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment