Fix Style::getCoverPhotoUrl()
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 27 Jul 2020 09:33:23 +0000 (11:33 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 27 Jul 2020 09:33:38 +0000 (11:33 +0200)
Make sure to return an absolute URL.

wcfsetup/install/files/lib/data/style/Style.class.php

index 2c3b6c0c1058e653af85c97053d62ed6c2344968..d8ace46aaef8f4e981c80821dfdd02e70157e3dc 100644 (file)
@@ -257,7 +257,7 @@ class Style extends DatabaseObject {
         */
        public function getCoverPhotoUrl() {
                if ($this->coverPhotoExtension) {
-                       return FileUtil::getRelativePath(WCF_DIR, $this->getAssetPath()).'coverPhoto.'.$this->coverPhotoExtension;
+                       return WCF::getPath() . FileUtil::getRelativePath(WCF_DIR, $this->getAssetPath()).'coverPhoto.'.$this->coverPhotoExtension;
                }
                return WCF::getPath() . 'images/coverPhotos/' . $this->getCoverPhoto();
        }