From 899c12f05aca7ed21ff5c0500e6c51fbbef704ce Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 1 Nov 2016 10:38:11 +0100 Subject: [PATCH] Removed image size handling during avatar import --- .../lib/system/importer/UserAvatarImporter.class.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/wcfsetup/install/files/lib/system/importer/UserAvatarImporter.class.php b/wcfsetup/install/files/lib/system/importer/UserAvatarImporter.class.php index ca5f8a67b9..512effb97c 100644 --- a/wcfsetup/install/files/lib/system/importer/UserAvatarImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/UserAvatarImporter.class.php @@ -3,7 +3,6 @@ namespace wcf\system\importer; use wcf\data\user\avatar\UserAvatar; use wcf\data\user\avatar\UserAvatarEditor; use wcf\system\exception\SystemException; -use wcf\system\image\ImageHandler; use wcf\system\WCF; use wcf\util\FileUtil; @@ -33,8 +32,6 @@ class UserAvatarImporter extends AbstractImporter { if ($imageData === false) return 0; $data['width'] = $imageData[0]; $data['height'] = $imageData[1]; - // check min size - if ($data['width'] < UserAvatar::AVATAR_SIZE || $data['height'] < UserAvatar::AVATAR_SIZE) return 0; // check image type if ($imageData[2] != IMAGETYPE_GIF && $imageData[2] != IMAGETYPE_JPEG && $imageData[2] != IMAGETYPE_PNG) return 0; @@ -62,14 +59,6 @@ class UserAvatarImporter extends AbstractImporter { throw new SystemException(); } - // enforces dimensions - if ($data['width'] > UserAvatar::AVATAR_SIZE || $data['height'] > UserAvatar::AVATAR_SIZE) { - $adapter = ImageHandler::getInstance()->getAdapter(); - $adapter->loadFile($avatar->getLocation()); - $thumbnail = $adapter->createThumbnail(UserAvatar::AVATAR_SIZE, UserAvatar::AVATAR_SIZE, false); - $adapter->writeImage($thumbnail, $avatar->getLocation()); - } - // update owner $sql = "UPDATE wcf".WCF_N."_user SET avatarID = ? -- 2.20.1