]> git.wh0rd.org Git - tt-rss.git/commitdiff
recently read: limit query by last_read
authorAndrew Dolgov <noreply@fakecake.org>
Sun, 13 Sep 2015 12:59:21 +0000 (15:59 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sun, 13 Sep 2015 12:59:21 +0000 (15:59 +0300)
include/functions2.php

index a135049a585a058b1214733897f2fdda960a4646..fb8a6a3d0b4ca50e27b0972a7296d8fa82e68538 100644 (file)
                                $query_strategy_part = "unread = false AND last_read IS NOT NULL";
 
                                if (DB_TYPE == "pgsql") {
-                                       $query_strategy_part .= " AND date_entered > NOW() - INTERVAL '1 DAY' ";
+                                       $query_strategy_part .= " AND last_read > NOW() - INTERVAL '1 DAY' ";
                                } else {
-                                       $query_strategy_part .= " AND date_entered > DATE_SUB(NOW(), INTERVAL 1 DAY) ";
+                                       $query_strategy_part .= " AND last_read > DATE_SUB(NOW(), INTERVAL 1 DAY) ";
                                }
 
                                $vfeed_query_part = "ttrss_feeds.title AS feed_title,";