Do not hardcode the style's asset path in the update script
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 5 Aug 2020 11:37:45 +0000 (13:37 +0200)
committerGitHub <noreply@github.com>
Wed, 5 Aug 2020 11:37:45 +0000 (13:37 +0200)
Co-authored-by: Alexander Ebert <ebert@woltlab.com>
wcfsetup/install/files/acp/update_com.woltlab.wcf_5.3_style.php

index 95a2bcb504513fc2c66a6acd9cc32dde2686e5ce..092d95bbd67e0c25b6abd887f23c70d2be3be883 100644 (file)
@@ -55,7 +55,7 @@ foreach ($styleList as $style) {
                }
        }
        $styleEditor->update([
-               'imagePath' => 'images/style-' . $style->styleID . '/',
+               'imagePath' => FileUtil::unifyDirSeparator(FileUtil::getRelativePath(WCF_DIR, $style->getAssetPath())),
        ]);
        
        // 4) Copy style previews into the asset folder.