From 6b8b3af87ee0f4cc123dab06a7c3ab405ab3df56 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 21 Apr 2011 18:27:44 +0400 Subject: [PATCH] filter_to_sql: properly set query limit by date --- functions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.39.5