From 074aee914d0645b3c39e1b1b49c9bccaeb89b4fc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 12 Dec 2017 09:48:32 +0100 Subject: [PATCH] set date of attachment --- utils/xmlimport.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/xmlimport.php b/utils/xmlimport.php index 703782300..08299948a 100644 --- a/utils/xmlimport.php +++ b/utils/xmlimport.php @@ -764,7 +764,7 @@ function insert_document($document) { /* {{{ */ $filename = tempnam('/tmp', 'FOO'); file_put_contents($filename, $filecontents); } - $newDocument->addDocumentFile( + $newfile = $newDocument->addDocumentFile( $file['attributes']['name'], $file['attributes']['comment'], $owner, @@ -775,6 +775,7 @@ function insert_document($document) { /* {{{ */ $file['attributes']['version'], $file['attributes']['public'] ); + $newfile->setDate(dateToTimestamp($file['attributes']['date'])); unlink($filename); } }