From 4a64d0a55a7efed4b40ee52beae003f02c92f828 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 26 Oct 2023 12:40:12 +0200 Subject: [PATCH] Generate a proper link to the thumbnail Using only the ID will cause the canonical URL to mismatch, triggering a pointless redirect. --- wcfsetup/install/files/lib/data/attachment/Attachment.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/attachment/Attachment.class.php b/wcfsetup/install/files/lib/data/attachment/Attachment.class.php index 6d8559bf1e..b202b4045c 100644 --- a/wcfsetup/install/files/lib/data/attachment/Attachment.class.php +++ b/wcfsetup/install/files/lib/data/attachment/Attachment.class.php @@ -232,7 +232,7 @@ class Attachment extends DatabaseObject implements ILinkableObject, IRouteContro public function getThumbnailLink($size = '') { $parameters = [ - 'id' => $this->attachmentID, + 'object' => $this, ]; if ($size == 'tiny') { -- 2.20.1