Fixed user group editing
authorAlexander Ebert <ebert@woltlab.com>
Wed, 25 Jan 2012 21:36:58 +0000 (22:36 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 25 Jan 2012 21:36:58 +0000 (22:36 +0100)
wcfsetup/install/files/lib/acp/form/UserGroupEditForm.class.php

index 69f7c0c375e6e4313ab23a23180cc7aefeeade12..5dfc11905dbaa1d7adaa49d1092be190680b9944 100755 (executable)
@@ -121,18 +121,18 @@ class UserGroupEditForm extends UserGroupAddForm {
                AbstractForm::save();
                
                // save group
+               $optionValues = $this->optionHandler->save();
                $saveOptions = array();
                if ($this->group->groupType == UserGroup::EVERYONE) {
-                       foreach ($this->options as $option) {
-                               $saveOptions[$option->optionID] = $this->optionValues[$option->optionName];
-                       }
+                       $saveOptions = $optionValues;
                }
                else {
                        // get default group
                        $defaultGroup = UserGroup::getGroupByType(UserGroup::EVERYONE);
-                       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];
                                }
                        }
                }