From: Andrew Dolgov Date: Thu, 21 Apr 2011 14:27:44 +0000 (+0400) Subject: filter_to_sql: properly set query limit by date X-Git-Tag: 1.5.4~15 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6b8b3af87ee0f4cc123dab06a7c3ab405ab3df56;p=tt-rss.git filter_to_sql: properly set query limit by date --- diff --git a/functions.php b/functions.php index e66c84ae..389aece1 100644 --- a/functions.php +++ b/functions.php @@ -7348,13 +7348,14 @@ 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; }