]> git.wh0rd.org Git - tt-rss.git/commitdiff
filter_to_sql: properly set query limit by date
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 21 Apr 2011 14:27:44 +0000 (18:27 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 21 Apr 2011 14:27:44 +0000 (18:27 +0400)
functions.php

index e66c84aeed5061938c18c5c80a858abc69db005f..389aece1ba3857896f85c96b27bff945b1070b3d 100644 (file)
 
                if ($query) {
                        if (DB_TYPE == "pgsql") {
-                               $query .= " AND ttrss_entries.date_entered > NOW() - INTERVAL '30 days'";
+                               $query = " ($query) AND ttrss_entries.date_entered > NOW() - INTERVAL '14 days'";
                        } else {
-                               $query .= " AND ttrss_entries.date_entered > DATE_SUB(NOW(), INTERVAL 30 DAY";
+                               $query = " ($query) AND ttrss_entries.date_entered > DATE_SUB(NOW(), INTERVAL 14 DAY";
                        }
                        $query .= " AND ";
                }
 
+
                return $query;
        }