From 010e423f786db7b4cd08a241bad6e3e5af84b131 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Mon, 23 May 2016 14:12:58 +0200 Subject: [PATCH] Fixed empty 'lastDownloadTime' after importing --- .../lib/system/importer/AbstractAttachmentImporter.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php index 61701ee535..ff37c42fcd 100644 --- a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php @@ -54,6 +54,11 @@ class AbstractAttachmentImporter extends AbstractImporter { if (!$attachment->attachmentID) $data['attachmentID'] = $oldID; } + // set default last download time + if (empty($data['lastDownloadTime']) && !empty($data['downloads'])) { + $data['lastDownloadTime'] = TIME_NOW; + } + // save attachment $attachment = AttachmentEditor::create(array_merge($data, ['objectTypeID' => $this->objectTypeID])); -- 2.20.1