From: Marcel Werk Date: Sun, 18 Dec 2016 15:13:25 +0000 (+0100) Subject: Fixed tiny embedded attachments X-Git-Tag: 3.0.0_RC_2~31 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=54d3cca18d094a513a93e76c241abe62e19fc9f9;p=GitHub%2FWoltLab%2FWCF.git Fixed tiny embedded attachments --- diff --git a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php index 3783677786..1ce39dff51 100644 --- a/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php +++ b/wcfsetup/install/files/lib/system/bbcode/AttachmentBBCode.class.php @@ -91,7 +91,13 @@ class AttachmentBBCode extends AbstractBBCode { $source = StringUtil::encodeHTML(LinkHandler::getInstance()->getLink('Attachment', ['object' => $attachment])); $title = StringUtil::encodeHTML($attachment->filename); - $result = ''; + $result = ''; + if ($attachment->width > ATTACHMENT_THUMBNAIL_WIDTH || $attachment->height > ATTACHMENT_THUMBNAIL_HEIGHT) { + $result = '' . $result . ''; + } + else { + $result = '' . $result . ''; + } } else { $linkParameters = [