Use ->getLocation() in UserCoverPhoto::createWebpVariant()
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 20 Aug 2021 07:20:51 +0000 (09:20 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 20 Aug 2021 07:20:51 +0000 (09:20 +0200)
This partially reapplies c3ebf8b995927b826072cfcc72d08a9ebd93f878 which was
reverted in 300312306b2858b6b9f474a30814fe16c3e1854c.

wcfsetup/install/files/lib/data/user/cover/photo/UserCoverPhoto.class.php

index 30c68c9d75f23744c0e89d8b72a5bc998ce99d74..d5162e91f60d2fc1baa3e75fe407d93532987a21 100644 (file)
@@ -114,7 +114,7 @@ class UserCoverPhoto implements IWebpUserCoverPhoto
             return;
         }
 
-        $sourceLocation = WCF_DIR . 'images/coverPhotos/' . $this->getFilename($this->coverPhotoExtension === 'webp');
+        $sourceLocation = $this->getLocation($this->coverPhotoExtension === 'webp');
         $outputFilenameWithoutExtension = \preg_replace('~\.[a-z]+$~', '', $sourceLocation);
 
         return ImageUtil::createWebpVariant($sourceLocation, $outputFilenameWithoutExtension);