From e40f4d2f176597ffa77bda7afc223ea33170b7e1 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 9 Oct 2013 14:00:37 +0200 Subject: [PATCH] Fixed attachment import issue --- .../system/importer/AbstractAttachmentImporter.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php index eb7f53f5c8..c11a5e2778 100644 --- a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php @@ -1,6 +1,7 @@ getNewID('com.woltlab.wcf.user', $data['userID']); + // check existing attachment id + if (is_numeric($oldID)) { + $attachment = new Attachment($oldID); + if (!$attachment->attachmentID) $data['attachmentID'] = $oldID; + } + // save attachment $attachment = AttachmentEditor::create(array_merge($data, array('objectTypeID' => $this->objectTypeID))); -- 2.20.1