issue #1946 implement backend for search by date_posted

This commit is contained in:
plegall
2023-07-24 16:49:53 +02:00
parent 6907bf26f5
commit 87c4fad23e
3 changed files with 25 additions and 0 deletions
+11
View File
@@ -195,6 +195,17 @@ SELECT
}
}
if (!empty($search['fields']['date_posted']))
{
$options = array(
'7d' => '7 DAY',
'30d' => '30 DAY',
'6m' => '6 MONTH',
'1y' => '1 YEAR',
);
$clauses[] = 'date_available > SUBDATE(NOW(), INTERVAL '.$options[ $search['fields']['date_posted'] ].')';
}
if (!empty($search['fields']['filetypes']))
{
$filetypes_clauses = array();