From cb8f22915982115b551e07842fa0a719b2050b35 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 2 Mar 2012 09:55:30 +0100 Subject: [PATCH] Fixes user search form --- .../files/lib/acp/form/UserSearchForm.class.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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)); -- 2.20.1