From e16afcc26133594baee5b11e1eeee361a17f7027 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 12 Oct 2023 19:21:30 +0200 Subject: [PATCH] Fix the default value for the custom CSS field See https://www.woltlab.com/community/thread/302018-individuelles-css-und-scss-erg%C3%A4nzend-f%C3%BCr-dunkles-farbschema/ --- .../acp/update_com.woltlab.wcf_6.0.1.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0.1.php diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0.1.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0.1.php new file mode 100644 index 0000000000..a8c42e0b4b --- /dev/null +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0.1.php @@ -0,0 +1,29 @@ + + */ + +use wcf\system\WCF; + +// Fix the default value for style variables. +$sql = "UPDATE wcf1_style_variable + SET defaultValueDarkMode = ? + WHERE variableName = ?"; +$statement = WCF::getDB()->prepare($sql); +$statement->execute([null, 'individualScssDarkMode']); + +// Fixes any bad values stored for existing styles. +$sql = "UPDATE wcf1_style_variable_value + SET variableValueDarkMode = ? + WHERE variableID = ( + SELECT variableID + FROM wcf1_style_variable + WHERE variableName = ? + )"; +$statement = WCF::getDB()->prepare($sql); +$statement->execute([null, 'individualScssDarkMode']); -- 2.20.1