fix catchup not working on Fresh articles

This commit is contained in:
Andrew Dolgov 2013-04-03 13:48:50 +04:00
parent 737ede9cbc
commit cfd34086c1
1 changed files with 3 additions and 3 deletions

View File

@ -1073,9 +1073,9 @@
$intl = get_pref($link, "FRESH_ARTICLE_MAX_AGE"); $intl = get_pref($link, "FRESH_ARTICLE_MAX_AGE");
if (DB_TYPE == "pgsql") { if (DB_TYPE == "pgsql") {
$match_part = "updated > NOW() - INTERVAL '$intl hour' "; $match_part = "date_entered > NOW() - INTERVAL '$intl hour' ";
} else { } else {
$match_part = "updated > DATE_SUB(NOW(), $match_part = "date_entered > DATE_SUB(NOW(),
INTERVAL $intl HOUR) "; INTERVAL $intl HOUR) ";
} }
@ -1083,7 +1083,7 @@
SET unread = false, last_read = NOW() WHERE ref_id IN SET unread = false, last_read = NOW() WHERE ref_id IN
(SELECT id FROM (SELECT id FROM
(SELECT id FROM ttrss_entries, ttrss_user_entries WHERE ref_id = id (SELECT id FROM ttrss_entries, ttrss_user_entries WHERE ref_id = id
AND owner_uid = $owner_uid AND unread = true AND feed_id = $feed AND $date_qpart AND $match_part) as tmp)"); AND owner_uid = $owner_uid AND unread = true AND $date_qpart AND $match_part) as tmp)");
} }
if ($feed == -4) { if ($feed == -4) {