Partially fixed group edit
authorAlexander Ebert <ebert@woltlab.com>
Mon, 23 Jan 2012 20:52:04 +0000 (21:52 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 23 Jan 2012 20:52:04 +0000 (21:52 +0100)
wcfsetup/install/files/lib/acp/form/UserGroupEditForm.class.php

index ee07b7066616af5209d4354b1cd09ea4c989ca18..cfa9239b9754504570fbc390cc8ef7f7b375e31e 100755 (executable)
@@ -69,22 +69,23 @@ class UserGroupEditForm extends UserGroupAddForm {
                if (!count($_POST)) {
                        I18nHandler::getInstance()->setOptions('groupName', 1, $this->group->groupName, 'wcf.acp.group.group\d+');
                        $this->groupName = $this->group->groupName;
+                       $options = $this->optionHandler->getCategoryOptions();
                        
                        // get default values
                        if ($this->group->groupType != UserGroup::EVERYONE) {
                                $defaultGroup = UserGroup::getGroupByType(UserGroup::EVERYONE);
-                               foreach ($this->options as $option) {
-                                       $value = $defaultGroup->getGroupOption($option->optionName);
+                               foreach ($options as $option) {
+                                       $value = $defaultGroup->getGroupOption($option['object']->optionName);
                                        if ($value !== null) {
-                                               $this->optionValues[$option->optionName] = $value;
+                                               $this->optionValues[$option['object']->optionName] = $value;
                                        }
                                }
                        }
                        
-                       foreach ($this->options as $option) {
-                               $value = $this->group->getGroupOption($option->optionName);
+                       foreach ($options as $option) {
+                               $value = $this->group->getGroupOption($option['object']->optionName);
                                if ($value !== null) {
-                                       $this->optionValues[$option->optionName] = $value;
+                                       $this->optionValues[$option['object']->optionName] = $value;
                                }
                        }
                }