]> git.wh0rd.org Git - tt-rss.git/commitdiff
limit recently read feed to 1 day of read headlines
authorAndrew Dolgov <noreply@fakecake.org>
Wed, 12 Aug 2015 07:02:46 +0000 (10:02 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Wed, 12 Aug 2015 07:02:46 +0000 (10:02 +0300)
include/functions2.php

index 6ccdc9a58b933329c606f6863c23a742e025a57c..af92b1340660f4ad3223d62270e32738112cc6a3 100644 (file)
                                }
                        } else if ($feed == -6) { // recently read
                                $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' ";
+                               } else {
+                                       $query_strategy_part .= " AND date_entered > DATE_SUB(NOW(), INTERVAL 1 DAY) ";
+                               }
+
                                $vfeed_query_part = "ttrss_feeds.title AS feed_title,";
                                $allow_archived = true;
                                $ignore_vfeed_group = true;