From 421f83044b04418b25ae171af46baa7561f92745 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 4 Jun 2021 10:25:54 +0200 Subject: [PATCH] Ensure the style logo is properly preserved in the database when not performing changes This bug was introduced recently when the `!$file->isProcessed()` condition was added. It was verified that the logo's filename remained stable within the file system. However it was not verified that it was properly stored within the database. As the previous style variables are deleted during the update we must explicitly set the corresponding variable, otherwise it will be empty and the logo will not be found. see c72c06dc7bb21c5098613ab8fafc8596c8f6ce41 see #4240 --- wcfsetup/install/files/lib/data/style/StyleAction.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wcfsetup/install/files/lib/data/style/StyleAction.class.php b/wcfsetup/install/files/lib/data/style/StyleAction.class.php index c478452735..3c774e8f74 100644 --- a/wcfsetup/install/files/lib/data/style/StyleAction.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleAction.class.php @@ -200,6 +200,9 @@ class StyleAction extends AbstractDatabaseObjectAction implements IToggleAction $this->parameters['variables'][$type] = $newName; $file->setProcessed($newLocation); } + else { + $this->parameters['variables'][$type] = \basename($file->getLocation()); + } } else { $this->parameters['variables'][$type] = ''; -- 2.20.1