<!--
tar cvf com.woltlab.wcf/files_pre_check.tar -C wcfsetup/install/files/ \
acp/update_com.woltlab.wcf_5.5_ensureInnoDbSearch.php \
- acp/update_com.woltlab.wcf_5.5_normalizeFileLog.php
+ acp/update_com.woltlab.wcf_5.5_normalizeFileLog.php \
+ acp/update_com.woltlab.wcf_5.5_styleVariables.php
-->
<instruction type="file" run="standalone">files_pre_check.tar</instruction>
<!-- Clean up the file log. -->
<instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.5_normalizeFileLog.php</instruction>
+ <!-- Insert the new style variables early to prevent style rebuilds bricking the system. -->
+ <instruction type="script" run="standalone">acp/update_com.woltlab.wcf_5.5_styleVariables.php</instruction>
+
<!-- Deploy new application code. -->
<instruction type="file" />
<instruction type="acpTemplate" />
--- /dev/null
+<?php
+
+/**
+ * Inserts new style variables introduced with WoltLab Suite 5.5.
+ *
+ * @author Alexander Ebert
+ * @copyright 2001-2021 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core
+ */
+
+use wcf\system\WCF;
+
+$values = [
+ 'wcfUserMenuBackground' => 'rgba(255, 255, 255, 1)',
+ 'wcfUserMenuBackgroundActive' => 'rgba(239, 239, 239, 1)',
+ 'wcfUserMenuText' => 'rgba(58, 58, 61, 1)',
+ 'wcfUserMenuTextDimmed', 'rgba(108, 108, 108, 1)',
+ 'wcfUserMenuIndicator' => 'rgba(49, 138, 220, 1)',
+ 'wcfUserMenuBorder' => 'rgb(221, 221, 221, 1)',
+];
+
+$sql = "INSERT IGNORE INTO wcf1_style_variable (variableName, defaultValue) VALUES (?, ?)";
+$statement = WCF::getDB()->prepare($sql);
+foreach ($values as $variableName => $defaultValue) {
+ $statement->execute([
+ $variableName,
+ $defaultValue,
+ ]);
+}
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTextShadowLight', 'rgba(255, 255, 255, .8)');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTooltipBackground', 'rgba(0, 0, 0, .8)');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfTooltipText', 'rgba(255, 255, 255, 1)');
-
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfUserMenuBackground', 'rgba(255, 255, 255, 1)');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfUserMenuBackgroundActive', 'rgba(239, 239, 239, 1)');
INSERT INTO wcf1_style_variable (variableName, defaultValue) VALUES ('wcfUserMenuText', 'rgba(58, 58, 61, 1)');