Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2024-04-28 10:03:14 +02:00
commit a0e906a067

View File

@ -867,11 +867,11 @@ function insert_document($document) { /* {{{ */
$file['attributes']['version'], $file['attributes']['version'],
$file['attributes']['public'] $file['attributes']['public']
); );
$d = dateToTimestamp($file['attributes']['date']); if($newfile) {
if($d) $newfile->setDate(dateToTimestamp($file['attributes']['date']));
$newfile->setDate($d); } else {
else $logger->error("File ".$file['attributes']['name']." could not be added.");
$logger->warning("File date (".$file['attributes']['date'].") could not be parsed."); }
unlink($filename); unlink($filename);
} }
} }