From c292cfc3763a07281deb3b0767a5d84a6021b9a9 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 29 Mar 2023 13:47:58 +0200 Subject: [PATCH] Add an update script to import the new style variables and dark mode values Fixes #5354 --- com.woltlab.wcf/package.xml | 2 + ...ate_com.woltlab.wcf_6.0_styleVariables.php | 174 ++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0_styleVariables.php diff --git a/com.woltlab.wcf/package.xml b/com.woltlab.wcf/package.xml index ba12a17b32..b5af103a24 100644 --- a/com.woltlab.wcf/package.xml +++ b/com.woltlab.wcf/package.xml @@ -93,6 +93,8 @@ tar cvf com.woltlab.wcf/files_pre_check.tar -C wcfsetup/install/files/ \ acp/database/update_com.woltlab.wcf_6.0_trackedVisit_step2.php acp/database/update_com.woltlab.wcf_6.0_trackedVisit_step3.php + acp/update_com.woltlab.wcf_6.0_styleVariables.php + diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0_styleVariables.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0_styleVariables.php new file mode 100644 index 0000000000..c894dda114 --- /dev/null +++ b/wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0_styleVariables.php @@ -0,0 +1,174 @@ +prepare($sql); + +foreach ($styleVariables as $data) { + list($variableName, $defaultValue, $defaultValueDarkMode) = $data; + + $statement->execute([ + $variableName, + $defaultValue, + $defaultValueDarkMode, + ]); +} -- 2.20.1