check expiration date in search()

This commit is contained in:
Uwe Steinmann 2021-09-22 09:39:18 +02:00
parent 8e7d2547b4
commit b777b786dd

View File

@ -665,7 +665,7 @@ class SeedDMS_Core_DMS {
* If the parameter $date is a negative number or a date in the past, then
* all documents from the start of that date till the end of the current
* day will be returned. If $date is a positive integer or $date is a
* date in the future, the all documents from the start of the current
* date in the future, then all documents from the start of the current
* day till the end of the day of the given date will be returned.
* Passing 0 or the
* current date in $date, will return all documents expiring the current
@ -692,7 +692,9 @@ class SeedDMS_Core_DMS {
} elseif(is_string($date)) {
$tmp = explode('-', $date, 3);
if(count($tmp) != 3)
return false;
return false;
if(!self::checkDate($date, 'Y-m-d'))
return false;
$ts = mktime(0, 0, 0, $tmp[1], $tmp[2], $tmp[0]);
} else
return false;