From: Marcel Werk Date: Wed, 31 Jul 2013 11:52:18 +0000 (+0200) Subject: Fixed import issue X-Git-Tag: 2.0.0_Beta_7~75^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=34a82bc12f1eca7075a7275ebec501ddde841fc2;p=GitHub%2FWoltLab%2FWCF.git Fixed import issue --- 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']);