From 34a82bc12f1eca7075a7275ebec501ddde841fc2 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 31 Jul 2013 13:52:18 +0200 Subject: [PATCH] Fixed import issue --- .../system/importer/AbstractAttachmentImporter.class.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php index 5334d54aee..95512042b6 100644 --- a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php @@ -32,6 +32,15 @@ class AbstractAttachmentImporter implements IImporter { // get file hash if (empty($data['fileHash'])) $data['fileHash'] = sha1_file($additionalData['fileLocation']); + // get image size + if (!empty($data['isImage'])) { + $imageData = @getimagesize($additionalData['fileLocation']); + if ($imageData !== false) { + $data['width'] = $imageData[0]; + $data['height'] = $imageData[1]; + } + } + // get user id $data['userID'] = ImportHandler::getInstance()->getNewID('com.woltlab.wcf.user', $data['userID']); -- 2.20.1