From: Matthias Schmidt Date: Tue, 19 Jan 2016 19:27:53 +0000 (+0100) Subject: Fix user option conditions in user bulk processing X-Git-Tag: 2.1.10~30^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=06bc7adb07418a441fe5130516b6ae7b86b534fe;p=GitHub%2FWoltLab%2FWCF.git Fix user option conditions in user bulk processing --- diff --git a/wcfsetup/install/files/lib/acp/form/UserBulkProcessingForm.class.php b/wcfsetup/install/files/lib/acp/form/UserBulkProcessingForm.class.php index cf445a6c7d..5c727d9df3 100644 --- a/wcfsetup/install/files/lib/acp/form/UserBulkProcessingForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/UserBulkProcessingForm.class.php @@ -21,7 +21,7 @@ use wcf\util\StringUtil; * Shows the user bulk processing form. * * @author Marcel Werk - * @copyright 2001-2014 WoltLab GmbH + * @copyright 2001-2015 WoltLab GmbH * @license GNU Lesser General Public License * @package com.woltlab.wcf * @subpackage acp.form @@ -144,6 +144,15 @@ class UserBulkProcessingForm extends UserOptionListForm { */ public $activeOptions = array(); + /** + * @see \wcf\acp\form\AbstractOptionListForm::initOptionHandler() + */ + protected function initOptionHandler() { + $this->optionHandler->enableSearchMode(); + + parent::initOptionHandler(); + } + /** * @see \wcf\form\IForm::readFormParameters() */ @@ -269,10 +278,11 @@ class UserBulkProcessingForm extends UserOptionListForm { $this->conditions->add('user_table.activationCode <> ?', array(0)); } - // dynamic fields - foreach ($this->activeOptions as $name => $option) { - $value = isset($this->values[$option['optionName']]) ? $this->values[$option['optionName']] : null; - $this->getTypeObject($option['optionType'])->getCondition($this->conditions, $option, $value); + foreach ($this->optionHandler->getCategoryOptions('profile') as $option) { + $option = $option['object']; + + $value = isset($this->optionHandler->optionValues[$option->optionName]) ? $this->optionHandler->optionValues[$option->optionName] : null; + $this->optionHandler->getTypeObject($option->optionType)->getCondition($this->conditions, $option, $value); } // call buildConditions event @@ -465,12 +475,6 @@ class UserBulkProcessingForm extends UserOptionListForm { $this->availableGroups = $this->getAvailableGroups(); - foreach ($this->activeOptions as $name => $option) { - if (isset($this->values[$name])) { - $this->activeOptions[$name]['optionValue'] = $this->values[$name]; - } - } - $this->options = $this->optionHandler->getCategoryOptions('profile'); }