From: Marcel Werk Date: Tue, 5 Apr 2022 15:58:30 +0000 (+0200) Subject: Use moddefaultvalue to set moderation permissions X-Git-Tag: 5.5.0_Alpha_1~4^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed3cb2f5dbdd8800503737b269f1f71019d5f7c2;p=GitHub%2FWoltLab%2Fcom.woltlab.wcf.conversation.git Use moddefaultvalue to set moderation permissions Closes #172 --- diff --git a/files/acp/install_com.woltlab.wcf.conversation.php b/files/acp/install_com.woltlab.wcf.conversation.php deleted file mode 100644 index 05cfae8..0000000 --- a/files/acp/install_com.woltlab.wcf.conversation.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ - -use wcf\data\user\group\UserGroup; -use wcf\system\WCF; - -// set default mod permissions -$group = new UserGroup(5); -if ($group->groupID) { - $sql = "REPLACE INTO wcf" . WCF_N . "_user_group_option_value - (groupID, optionID, optionValue) - SELECT 5, optionID, 1 - FROM wcf" . WCF_N . "_user_group_option - WHERE optionName LIKE 'mod.conversation.%'"; - $statement = WCF::getDB()->prepareStatement($sql); - $statement->execute(); -} - -$group = new UserGroup(6); -if ($group->groupID) { - $sql = "REPLACE INTO wcf" . WCF_N . "_user_group_option_value - (groupID, optionID, optionValue) - SELECT 6, optionID, 1 - FROM wcf" . WCF_N . "_user_group_option - WHERE optionName LIKE 'mod.conversation.%'"; - $statement = WCF::getDB()->prepareStatement($sql); - $statement->execute(); -} diff --git a/package.xml b/package.xml index 1301f73..dc80b7a 100644 --- a/package.xml +++ b/package.xml @@ -37,7 +37,6 @@ - acp/install_com.woltlab.wcf.conversation.php diff --git a/userGroupOption.xml b/userGroupOption.xml index d28aa9d..7b75369 100644 --- a/userGroupOption.xml +++ b/userGroupOption.xml @@ -18,6 +18,7 @@ boolean 0 module_conversation + 1 1 1 @@ -26,6 +27,7 @@ boolean 0 module_conversation + 1 1 1