Added default permissions for moderators
authorMarcel Werk <burntime@woltlab.com>
Sun, 2 Jun 2013 22:06:44 +0000 (00:06 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 2 Jun 2013 22:06:44 +0000 (00:06 +0200)
wcfsetup/install/files/acp/post_install.php

index 442713fdd28d8f18c1f47dbae43948d40b8afff6..8dfbfb157263753292c987a3de64f7a38fec7623 100644 (file)
@@ -24,3 +24,19 @@ $action = new UserProfileAction(array($editor), 'updateUserRank');
 $action->executeAction();
 $action = new UserProfileAction(array($editor), 'updateUserOnlineMarking');
 $action->executeAction();
+
+// set default mod permissions
+$sql = "INSERT IGNORE 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.%'";
+$statement = WCF::getDB()->prepareStatement($sql);
+$statement->execute();
+$sql = "INSERT IGNORE 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.%'";
+$statement = WCF::getDB()->prepareStatement($sql);
+$statement->execute();