]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix catchup not working on Fresh articles
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 3 Apr 2013 09:48:50 +0000 (13:48 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 3 Apr 2013 09:48:50 +0000 (13:48 +0400)
include/functions.php

index aa1f0808bab12648e1de50c2836583b0cec49963..c06208d1489bb8a40d34afbd8bf3e0d529d76a88 100644 (file)
                                                $intl = get_pref($link, "FRESH_ARTICLE_MAX_AGE");
 
                                                if (DB_TYPE == "pgsql") {
-                                                       $match_part = "updated > NOW() - INTERVAL '$intl hour' ";
+                                                       $match_part = "date_entered > NOW() - INTERVAL '$intl hour' ";
                                                } else {
-                                                       $match_part = "updated > DATE_SUB(NOW(),
+                                                       $match_part = "date_entered > DATE_SUB(NOW(),
                                                                INTERVAL $intl HOUR) ";
                                                }
 
                                                        SET unread = false, last_read = NOW() WHERE ref_id IN
                                                                (SELECT id FROM
                                                                        (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) {