fixes #1968 new values for date_posted filter

* add 24h, 3m and yNNNN (year 2023 or 2022...)
* remove 1y
* provide labels from backend instead of managing it in javascript
This commit is contained in:
plegall
2023-08-26 12:55:12 +02:00
parent ab111cdbe2
commit e0a82909fa
8 changed files with 55 additions and 23 deletions
+1 -1
View File
@@ -838,7 +838,7 @@ function ws_images_filteredSearch_update($params, $service)
if (isset($params['date_posted']))
{
if (!preg_match('/^(7d|30d|6m|1y|)$/', $params['date_posted']))
if (!preg_match('/^(24h|7d|30d|3m|6m|y\d+|)$/', $params['date_posted']))
{
return new PwgError(WS_ERR_INVALID_PARAM, 'Invalid parameter date_posted');
}