check expiration date in search()

This commit is contained in:
Uwe Steinmann 2021-09-22 09:43:12 +02:00
parent 96f858cbdd
commit e23b9f09ad

View File

@ -1311,6 +1311,8 @@ class SeedDMS_Core_DMS {
$tmp = explode('-', $param2, 3); $tmp = explode('-', $param2, 3);
if(count($tmp) != 3) if(count($tmp) != 3)
return false; return false;
if(!self::checkDate($param2, 'Y-m-d'))
return false;
$ts = mktime(0, 0, 0, $tmp[1], $tmp[2], $tmp[0]); $ts = mktime(0, 0, 0, $tmp[1], $tmp[2], $tmp[0]);
} else } else
$ts = mktime(0, 0, 0)-365*86400; /* Start of today - 1 year */ $ts = mktime(0, 0, 0)-365*86400; /* Start of today - 1 year */