From: Matthias Schmidt Date: Fri, 2 Mar 2012 08:55:30 +0000 (+0100) Subject: Fixes user search form X-Git-Tag: 2.0.0_Beta_1~1277^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cb8f22915982115b551e07842fa0a719b2050b35;p=GitHub%2FWoltLab%2FWCF.git Fixes user search form --- diff --git a/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php b/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php index 58e804038e..4697385819 100755 --- a/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php @@ -148,9 +148,16 @@ class UserSearchForm extends UserOptionListForm { * @see wcf\page\IPage::readData() */ public function readData() { + $this->readOptionTree(); + parent::readData(); - - $this->optionTree = $this->getCategoryOptions('profile'); + } + + /** + * Reads option tree on page init. + */ + protected function readOptionTree() { + $this->optionTree = $this->optionHandler->getOptionTree(); } /** @@ -183,9 +190,6 @@ class UserSearchForm extends UserOptionListForm { // set active menu item ACPMenu::getInstance()->setActiveMenuItem($this->menuItemName); - // get user options and categories from cache - $this->readCache(); - // show form parent::show(); } @@ -289,7 +293,7 @@ class UserSearchForm extends UserOptionListForm { * Builds the dynamic conditions. */ protected function buildDynamicConditions() { - foreach ($this->options as $option) { + foreach ($this->optionTree as $option) { $value = isset($this->values[$option->optionName]) ? $this->values[$option->optionName] : null; $condition = $this->getTypeObject($option->optionType)->getCondition($option, $value); if ($condition !== false) $this->conditions->add($condition); @@ -305,6 +309,7 @@ class UserSearchForm extends UserOptionListForm { /** * @see wcf\acp\form\DynamicOptionListForm::checkOption() + * @todo deprecated? */ protected static function checkOption(Option $option) { return ($option->searchable == 1 && !$option->disabled && ($option->visible == 3 || $option->visible < 2));