* @package com.woltlab.wcf
* @category Community Framework
*/
-// make group names to language variables
-$groupNames = array(
- 'Everyone' => WCF::getLanguage()->get('wcf.acp.group.everyone'),
- 'Guests' => WCF::getLanguage()->get('wcf.acp.group.guests'),
- 'Users' => WCF::getLanguage()->get('wcf.acp.group.users'),
- 'Administrators' => WCF::getLanguage()->get('wcf.acp.group.administrators'),
- 'Moderators' => WCF::getLanguage()->get('wcf.acp.group.moderators'),
- 'Super Moderators' => WCF::getLanguage()->get('wcf.acp.group.superModerators')
-);
-
-$sql = "UPDATE wcf".WCF_N."_user_group
- SET groupName = ?
- WHERE groupName = ?";
-$statement = WCF::getDB()->prepareStatement($sql);
-foreach ($groupNames as $oldValue => $newValue) {
- $statement->execute(array($newValue, $oldValue));
-}
-
// change the priority of the PIP's to "1"
$sql = "UPDATE wcf".WCF_N."_package_installation_plugin
SET priority = ?";
if ($this->parameters['data']['includeUserGroups']) {
$accessibleGroups = UserGroup::getAccessibleGroups();
foreach ($accessibleGroups as $group) {
- $groupName = WCF::getLanguage()->get($group->groupName);
+ $groupName = $group->getName();
if (!in_array($groupName, $excludedSearchValues)) {
$pos = StringUtil::indexOfIgnoreCase($groupName, $searchString);
if ($pos !== false && $pos == 0) {
return self::isAccessibleGroup(array($this->groupID));
}
+ /**
+ * @see wcf\data\user\group\UserGroup::getName()
+ */
+ public function __toString() {
+ return $this->getName();
+ }
+
/**
* Returns the name of this user group.
*
* @return string
*/
- public function __tostring() {
- return $this->groupName;
+ public function getName() {
+ return WCF::getLanguage()->get('wcf.acp.group.group'.$this->groupID);
}
/**
// get all user groups
$groupList = new UserGroupList();
- $groupList->sqlOrderBy = "user_group.groupName";
$groupList->sqlLimit = 0;
$groupList->readObjects();
$groups = $groupList->getObjects();
// generate html
$html = '<fieldset><dl><dd>';
foreach ($groups as $group) {
- $html .= '<label><input type="checkbox" name="values['.StringUtil::encodeHTML($option->optionName).'][]" value="'.$group->groupID.'" '.(in_array($group->groupID, $selectedGroups) ? 'checked="checked" ' : '').'/> '.StringUtil::encodeHTML($group->groupName).'</label>';
+ $html .= '<label><input type="checkbox" name="values['.StringUtil::encodeHTML($option->optionName).'][]" value="'.$group->groupID.'" '.(in_array($group->groupID, $selectedGroups) ? 'checked="checked" ' : '').'/> '.$group->getName().'</label>';
}
return $html.'</dd></dl></fieldset>';
</category>
<category name="wcf.acp.group">
- <item name="wcf.acp.group.administrators"><![CDATA[Administratoren]]></item>
- <item name="wcf.acp.group.everyone"><![CDATA[Jeder]]></item>
- <item name="wcf.acp.group.guests"><![CDATA[Gäste]]></item>
- <item name="wcf.acp.group.moderators"><![CDATA[Moderatoren]]></item>
- <item name="wcf.acp.group.superModerators"><![CDATA[Super Moderatoren]]></item>
- <item name="wcf.acp.group.users"><![CDATA[Registrierte Benutzer]]></item>
<item name="wcf.acp.group.add"><![CDATA[Benutzergruppe hinzufügen]]></item>
<item name="wcf.acp.group.data"><![CDATA[Allgemeine Daten]]></item>
<item name="wcf.acp.group.delete.sure"><![CDATA[Wollen Sie diese Benutzergruppe „{$group->groupName}“ wirklich löschen?]]></item>
<item name="wcf.acp.group.edit"><![CDATA[Benutzergruppe bearbeiten]]></item>
<item name="wcf.acp.group.edit.warning.selfIsMember"><![CDATA[Sie sind Mitglied dieser Benutzergruppe! Änderungen an den Zugriffsrechten dieser Benutzergruppe können dazu führen, dass Sie aus der Administrationsoberfläche ausgeschlossen werden. Bitte seien Sie entsprechend vorsichtig!]]></item>
+ <item name="wcf.acp.group.group1"><![CDATA[Jeder]]></item>
+ <item name="wcf.acp.group.group2"><![CDATA[Gäste]]></item>
+ <item name="wcf.acp.group.group3"><![CDATA[Registrierte Benutzer]]></item>
+ <item name="wcf.acp.group.group4"><![CDATA[Administratoren]]></item>
+ <item name="wcf.acp.group.group5"><![CDATA[Moderatoren]]></item>
+ <item name="wcf.acp.group.group6"><![CDATA[Super Moderatoren]]></item>
<item name="wcf.acp.group.groupName"><![CDATA[Name der Benutzergruppe]]></item>
<item name="wcf.acp.group.groupName.description"><![CDATA[Geben Sie einen Namen für die Gruppe an.]]></item>
<item name="wcf.acp.group.list"><![CDATA[Benutzergruppen]]></item>
</category>
<category name="wcf.acp.group">
- <item name="wcf.acp.group.administrators"><![CDATA[Administrators]]></item>
- <item name="wcf.acp.group.everyone"><![CDATA[Everyone]]></item>
- <item name="wcf.acp.group.guests"><![CDATA[Guests]]></item>
- <item name="wcf.acp.group.moderators"><![CDATA[Moderators]]></item>
- <item name="wcf.acp.group.superModerators"><![CDATA[Super Moderators]]></item>
- <item name="wcf.acp.group.users"><![CDATA[Users]]></item>
<item name="wcf.acp.group.add"><![CDATA[Add new user group]]></item>
<item name="wcf.acp.group.data"><![CDATA[General group information]]></item>
<item name="wcf.acp.group.delete.sure"><![CDATA[Are you sure you would like to remove the user group "{$group->groupName}"?]]></item>
<item name="wcf.acp.group.edit"><![CDATA[Edit user group]]></item>
<item name="wcf.acp.group.edit.warning.selfIsMember"><![CDATA[You are currently a member of this user group! Changing the permissions of this user group could result in locking yourself out of the Administration Control Panel. Please be careful!]]></item>
+ <item name="wcf.acp.group.group1"><![CDATA[Everyone]]></item>
+ <item name="wcf.acp.group.group2"><![CDATA[Guests]]></item>
+ <item name="wcf.acp.group.group3"><![CDATA[Users]]></item>
+ <item name="wcf.acp.group.group4"><![CDATA[Administrators]]></item>
+ <item name="wcf.acp.group.group5"><![CDATA[Moderators]]></item>
+ <item name="wcf.acp.group.group6"><![CDATA[Super Moderators]]></item>
<item name="wcf.acp.group.groupName"><![CDATA[User group name]]></item>
<item name="wcf.acp.group.groupName.description"><![CDATA[Enter a name for this group.]]></item>
<item name="wcf.acp.group.list"><![CDATA[User groups]]></item>
/**** default inserts ****/
-- default user groups
-INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('Everyone', 1);
-INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('Guests', 2);
-INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('Users', 3);
-INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('Administrators', 4);
-INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('Moderators', 4);
-INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('Super Moderators', 4);
+INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('wcf.acp.group.group1', 1);
+INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('wcf.acp.group.group2', 2);
+INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('wcf.acp.group.group3', 3);
+INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('wcf.acp.group.group4', 4);
+INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('wcf.acp.group.group5', 4);
+INSERT INTO wcf1_user_group (groupName, groupType) VALUES ('wcf.acp.group.group6', 4);
-- default user group options
INSERT INTO wcf1_user_group_option (optionName, categoryName, optionType, defaultValue, adminDefaultValue, showOrder) VALUES ('admin.general.canUseAcp', 'admin.general', 'boolean', '0', '1', 1);