From ed3cb2f5dbdd8800503737b269f1f71019d5f7c2 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 5 Apr 2022 17:58:30 +0200 Subject: [PATCH] Use moddefaultvalue to set moderation permissions Closes #172 --- .../install_com.woltlab.wcf.conversation.php | 33 ------------------- package.xml | 1 - userGroupOption.xml | 2 ++ 3 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 files/acp/install_com.woltlab.wcf.conversation.php 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 -- 2.20.1