filter_to_sql: limit results to last 30 days of articles
This commit is contained in:
parent
da497babda
commit
6338b16fb5
|
@ -7301,8 +7301,14 @@
|
|||
if ($filter["inverse"])
|
||||
$query = "NOT ($query)";
|
||||
|
||||
if ($query)
|
||||
if ($query) {
|
||||
if (DB_TYPE == "pgsql") {
|
||||
$query .= " AND ttrss_entries.date_entered > NOW() - INTERVAL '30 days'";
|
||||
} else {
|
||||
$query .= " AND ttrss_entries.date_entered > DATE_SUB(NOW(), INTERVAL 30 DAY";
|
||||
}
|
||||
$query .= " AND ";
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue