From: Marcel Werk Date: Thu, 30 Jan 2014 21:39:23 +0000 (+0100) Subject: Fixed user search issue X-Git-Tag: 2.0.3~59 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b6319d7b8f50d13d5ac7c24720bc5e133ef52212;p=GitHub%2FWoltLab%2FWCF.git Fixed user search issue --- diff --git a/com.woltlab.wcf/templates/selectOptionType.tpl b/com.woltlab.wcf/templates/selectOptionType.tpl index 3ddf5f984d..98d1893d64 100644 --- a/com.woltlab.wcf/templates/selectOptionType.tpl +++ b/com.woltlab.wcf/templates/selectOptionType.tpl @@ -1,5 +1,5 @@ - {if $option->allowEmptyValue}{/if} + {if $allowEmptyValue}{/if} {foreach from=$selectOptions key=key item=selectOption} {/foreach} diff --git a/wcfsetup/install/files/lib/system/option/SelectOptionType.class.php b/wcfsetup/install/files/lib/system/option/SelectOptionType.class.php index 6ecd3b4e32..98f540b6d7 100644 --- a/wcfsetup/install/files/lib/system/option/SelectOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/SelectOptionType.class.php @@ -14,6 +14,8 @@ use wcf\system\WCF; * @category Community Framework */ class SelectOptionType extends RadioButtonOptionType { + protected $allowEmptyValue = false; + /** * @see \wcf\system\option\IOptionType::getFormElement() */ @@ -26,7 +28,8 @@ class SelectOptionType extends RadioButtonOptionType { 'enableOptions' => $options['enableOptions'], 'option' => $option, 'selectOptions' => $option->parseSelectOptions(), - 'value' => $value + 'value' => $value, + 'allowEmptyValue' => ($this->allowEmptyValue || $option->allowEmptyValue) )); return WCF::getTPL()->fetch('selectOptionType'); } @@ -35,6 +38,7 @@ class SelectOptionType extends RadioButtonOptionType { * @see \wcf\system\option\ISearchableUserOption::getSearchFormElement() */ public function getSearchFormElement(Option $option, $value) { + $this->allowEmptyValue = true; return $this->getFormElement($option, $value); }