From a690b2ad3da850b9446648401d566ea59ab0a260 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 4 Feb 2014 07:25:58 +0100 Subject: [PATCH] Fixes user search if no searchable user option exists/is enabled --- com.woltlab.wcf/templates/userSearch.tpl | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/com.woltlab.wcf/templates/userSearch.tpl b/com.woltlab.wcf/templates/userSearch.tpl index c941f004fd..ba522b247f 100644 --- a/com.woltlab.wcf/templates/userSearch.tpl +++ b/com.woltlab.wcf/templates/userSearch.tpl @@ -61,14 +61,16 @@ {event name='generalFields'} - {foreach from=$optionTree[0][categories] item=category} -
- {lang}wcf.user.option.category.{@$category[object]->categoryName}{/lang} - {hascontent}

{content}{lang __optional=true}wcf.user.option.category.{@$category[object]->categoryName}.description{/lang}{/content}

{/hascontent} - - {include file='userOptionFieldList' options=$category[options] langPrefix='wcf.user.option.'} -
- {/foreach} + {if !$optionTree|empty} + {foreach from=$optionTree[0][categories] item=category} +
+ {lang}wcf.user.option.category.{@$category[object]->categoryName}{/lang} + {hascontent}

{content}{lang __optional=true}wcf.user.option.category.{@$category[object]->categoryName}.description{/lang}{/content}

{/hascontent} + + {include file='userOptionFieldList' options=$category[options] langPrefix='wcf.user.option.'} +
+ {/foreach} + {/if} {event name='fieldsets'} -- 2.20.1