From: Marcel Werk Date: Sun, 24 Jul 2016 21:04:36 +0000 (+0200) Subject: Overhauled user profile header and avatar sizes X-Git-Tag: 3.0.0_Beta_1~974 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3461e1678413adbe19ada305840fa9d6b339434b;p=GitHub%2FWoltLab%2FWCF.git Overhauled user profile header and avatar sizes --- diff --git a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php index e5574efa64..bd628ccad2 100644 --- a/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php @@ -95,10 +95,17 @@ class UserRebuildDataWorker extends AbstractRebuildDataWorker { } if ($width < UserAvatar::AVATAR_SIZE || $height < UserAvatar::AVATAR_SIZE) { + $adapter = ImageHandler::getInstance()->getAdapter(); + $adapter->loadFile($avatar->getLocation()); + $adapter->resize(0, 0, $width, $height, UserAvatar::AVATAR_SIZE, UserAvatar::AVATAR_SIZE); + $adapter->writeImage($adapter->getImage(), $avatar->getLocation()); + $width = $height = UserAvatar::AVATAR_SIZE; } $editor = new UserAvatarEditor($avatar); $editor->update([ + 'width' => $width, + 'height' => $height ]); } }