set date of attachment

This commit is contained in:
Uwe Steinmann 2017-12-12 09:48:32 +01:00
parent da972bbc2b
commit 074aee914d

View File

@ -764,7 +764,7 @@ function insert_document($document) { /* {{{ */
$filename = tempnam('/tmp', 'FOO'); $filename = tempnam('/tmp', 'FOO');
file_put_contents($filename, $filecontents); file_put_contents($filename, $filecontents);
} }
$newDocument->addDocumentFile( $newfile = $newDocument->addDocumentFile(
$file['attributes']['name'], $file['attributes']['name'],
$file['attributes']['comment'], $file['attributes']['comment'],
$owner, $owner,
@ -775,6 +775,7 @@ function insert_document($document) { /* {{{ */
$file['attributes']['version'], $file['attributes']['version'],
$file['attributes']['public'] $file['attributes']['public']
); );
$newfile->setDate(dateToTimestamp($file['attributes']['date']));
unlink($filename); unlink($filename);
} }
} }