From d1e2223729e3badedaa6b945f409e883d0c783f7 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 23 Jan 2012 21:14:25 +0100 Subject: [PATCH] Fixed saving of user groups --- .../files/lib/acp/form/UserGroupAddForm.class.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php b/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php index 596d8a6607..246d531a45 100755 --- a/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserGroupAddForm.class.php @@ -67,6 +67,11 @@ class UserGroupAddForm extends AbstractOptionListForm { */ public $optionHandlerClassName = 'wcf\system\option\user\group\UserGroupOptionHandler'; + /** + * @see wcf\acp\form\AbstractOptionListForm::$supportI18n + */ + public $supportI18n = false; + /** * group name * @var string @@ -131,10 +136,12 @@ class UserGroupAddForm extends AbstractOptionListForm { // get default group $defaultGroup = UserGroup::getGroupByType(UserGroup::EVERYONE); + $optionValues = $this->optionHandler->save(); $saveOptions = array(); - foreach ($this->options as $option) { - if ($this->optionValues[$option->optionName] != $defaultGroup->getGroupOption($option->optionName)) { - $saveOptions[$option->optionID] = $this->optionValues[$option->optionName]; + foreach ($this->optionHandler->getCategoryOptions() as $option) { + $option = $option['object']; + if ($optionValues[$option->optionID] != $defaultGroup->getGroupOption($option->optionName)) { + $saveOptions[$option->optionID] = $optionValues[$option->optionID]; } } -- 2.20.1