From: joshuaruesweg Date: Fri, 11 Dec 2020 10:48:22 +0000 (+0100) Subject: Reload styleEditor after updating image path X-Git-Tag: 5.3.2~46 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e32485ce3abad0c664cfdda26b4d98fd98e9aa62;p=GitHub%2FWoltLab%2FWCF.git Reload styleEditor after updating image path Because the style is compiled after the variables have been set, we have to reload the style object once with the correct `imagePath` so that it can be used correctly in the initial compilation. --- diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index 7158e8781f..e8cc533f41 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -1089,6 +1089,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject $styleEditor->update([ 'imagePath' => FileUtil::getRelativePath(WCF_DIR, $style->getAssetPath()), ]); + $styleEditor = new StyleEditor(new Style($style->styleID)); // save variables if ($variables !== null) {