<instruction type="mediaProvider" />
<instruction type="style">defaultStyle.tar</instruction>
+
+ <instruction type="script" run="standalone" flushCache="false">acp/update_com.woltlab.wcf_3.1_postUpgrade.php</instruction>
</instructions>
<instructions type="update" fromversion="3.1.0 Alpha 1">
--- /dev/null
+<?php
+use wcf\system\WCF;
+
+/**
+ * @author Alexander Ebert
+ * @copyright 2001-2017 WoltLab GmbH
+ * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
+ * @package WoltLabSuite\Core
+ */
+// force disable of HTML bbcode for all groups
+$sql = "UPDATE wcf".WCF_N."_user_group_option_value
+ SET optionValue = ?
+ WHERE groupID = ?
+ AND optionID = ?";
+$updateStatement = WCF::getDB()->prepareStatement($sql);
+
+$sql = "SELECT *
+ FROM wcf".WCF_N."_user_group_option_value
+ WHERE optionID IN (
+ SELECT optionID
+ FROM wcf".WCF_N."_user_group_option
+ WHERE optionType = ?
+ )";
+$statement = WCF::getDB()->prepareStatement($sql);
+$statement->execute(['BBCodeSelect']);
+
+WCF::getDB()->beginTransaction();
+while ($row = $statement->fetchArray()) {
+ $value = $row['optionValue'];
+ if (!empty($value)) $value .= ',';
+ $value .= 'html';
+
+ $updateStatement->execute([
+ $value,
+ $row['groupID'],
+ $row['optionID']
+ ]);
+}
+WCF::getDB()->commitTransaction();