Fix the style variable value for `individualScssDarkMode`
authorAlexander Ebert <ebert@woltlab.com>
Mon, 11 Sep 2023 17:47:04 +0000 (19:47 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 11 Sep 2023 17:47:04 +0000 (19:47 +0200)
wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0.0.rc.1.php [new file with mode: 0644]

diff --git a/wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0.0.rc.1.php b/wcfsetup/install/files/acp/update_com.woltlab.wcf_6.0.0.rc.1.php
new file mode 100644 (file)
index 0000000..084d17b
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * Fixes the style variable value of `individualScssDarkMode`.
+ *
+ * @author Alexander Ebert
+ * @copyright 2001-2023 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ */
+
+use wcf\system\WCF;
+
+// Follow-up for https://github.com/WoltLab/WCF/commit/ccf4bcc71444a0c75c7543483585706895b51bd8
+$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']);