Generate a proper link to the thumbnail
authorAlexander Ebert <ebert@woltlab.com>
Thu, 26 Oct 2023 10:40:12 +0000 (12:40 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 26 Oct 2023 10:40:12 +0000 (12:40 +0200)
Using only the ID will cause the canonical URL to mismatch, triggering a pointless redirect.

wcfsetup/install/files/lib/data/attachment/Attachment.class.php

index 6d8559bf1ee4844829e8b674d879e9bff023823f..b202b4045cb75728ae3d643ba395d63d14de9186 100644 (file)
@@ -232,7 +232,7 @@ class Attachment extends DatabaseObject implements ILinkableObject, IRouteContro
     public function getThumbnailLink($size = '')
     {
         $parameters = [
-            'id' => $this->attachmentID,
+            'object' => $this,
         ];
 
         if ($size == 'tiny') {