7527b59e50e7a487a1564816eb002118fb24c790
[GitHub/WoltLab/com.woltlab.wcf.conversation.git] / files / acp / install_com.woltlab.wcf.conversation.php
1 <?php
2
3 /**
4 * @author Matthias Schmidt
5 * @copyright 2001-2019 WoltLab GmbH
6 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
7 */
8
9 use wcf\data\user\group\UserGroup;
10 use wcf\system\WCF;
11
12 // set default mod permissions
13 $group = new UserGroup(5);
14 if ($group->groupID) {
15 $sql = "REPLACE INTO wcf" . WCF_N . "_user_group_option_value
16 (groupID, optionID, optionValue)
17 SELECT 5, optionID, 1
18 FROM wcf" . WCF_N . "_user_group_option
19 WHERE optionName LIKE 'mod.conversation.%'";
20 $statement = WCF::getDB()->prepareStatement($sql);
21 $statement->execute();
22 }
23
24 $group = new UserGroup(6);
25 if ($group->groupID) {
26 $sql = "REPLACE INTO wcf" . WCF_N . "_user_group_option_value
27 (groupID, optionID, optionValue)
28 SELECT 6, optionID, 1
29 FROM wcf" . WCF_N . "_user_group_option
30 WHERE optionName LIKE 'mod.conversation.%'";
31 $statement = WCF::getDB()->prepareStatement($sql);
32 $statement->execute();
33 }