diff options
author | Andrew Dolgov <[email protected]> | 2011-04-21 18:27:44 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-04-21 18:27:44 +0400 |
commit | 6b8b3af87ee0f4cc123dab06a7c3ab405ab3df56 (patch) | |
tree | d2e96d5413da48d2a0747c5427d34724858ee71d | |
parent | d206ae1d6a2c5cbd213cbaaeef03e9d8e15c9e88 (diff) |
filter_to_sql: properly set query limit by date
-rw-r--r-- | functions.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/functions.php b/functions.php index e66c84aee..389aece1b 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; } |