]> git.wh0rd.org Git - tt-rss.git/commitdiff
fresh feed: match FRESH_ARTICLE_MAX_AGE to ttrss_entries.updated, not date_entered
authorAndrew Dolgov <fox@madoka.spb.ru>
Sat, 17 May 2008 14:54:55 +0000 (15:54 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Sat, 17 May 2008 14:54:55 +0000 (15:54 +0100)
functions.php

index cf17a2a9c1538c34b34a288b67ef6b4f7aeeac3a..2696f9f223ff94cb665a1d06bd7686b46bbeb09d 100644 (file)
                                                $intl = get_pref($link, "FRESH_ARTICLE_MAX_AGE");
 
                                                if (DB_TYPE == "pgsql") {
-                                                       $match_part = "date_entered > NOW() - INTERVAL '$intl hour' "; 
+                                                       $match_part = "updated > NOW() - INTERVAL '$intl hour' "; 
                                                } else {
-                                                       $match_part = "date_entered > DATE_SUB(NOW(), 
+                                                       $match_part = "updated > DATE_SUB(NOW(), 
                                                                INTERVAL $intl HOUR) ";
                                                }
 
                        $intl = get_pref($link, "FRESH_ARTICLE_MAX_AGE");
 
                        if (DB_TYPE == "pgsql") {
-                               $match_part .= " AND date_entered > NOW() - INTERVAL '$intl hour' "; 
+                               $match_part .= " AND updated > NOW() - INTERVAL '$intl hour' "; 
                        } else {
-                               $match_part .= " AND date_entered > DATE_SUB(NOW(), INTERVAL $intl HOUR) ";
+                               $match_part .= " AND updated > DATE_SUB(NOW(), INTERVAL $intl HOUR) ";
                        }
 
                } else if ($n_feed > 0) {
                                $intl = get_pref($link, "FRESH_ARTICLE_MAX_AGE", $owner_uid);
 
                                if (DB_TYPE == "pgsql") {
-                                       $query_strategy_part .= " AND date_entered > NOW() - INTERVAL '$intl hour' "; 
+                                       $query_strategy_part .= " AND updated > NOW() - INTERVAL '$intl hour' "; 
                                } else {
-                                       $query_strategy_part .= " AND date_entered > DATE_SUB(NOW(), INTERVAL $intl HOUR) ";
+                                       $query_strategy_part .= " AND updated > DATE_SUB(NOW(), INTERVAL $intl HOUR) ";
                                }
 
                                $vfeed_query_part = "ttrss_feeds.title AS feed_title,";