This commit is contained in:
parent
6dec97c21d
commit
a3077b96b5
2 changed files with 22 additions and 4 deletions
|
@ -838,13 +838,23 @@ public class IndexAction {
|
|||
final Set<String> langSet = new HashSet<>();
|
||||
for (final String lang : indexForm.lang) {
|
||||
if (StringUtil.isNotBlank(lang) && lang.length() < 1000) {
|
||||
final String normalizeLang = systemHelper
|
||||
.normalizeLang(lang);
|
||||
if (normalizeLang != null) {
|
||||
langSet.add(normalizeLang);
|
||||
if (Constants.ALL_LANGUAGES.equalsIgnoreCase(lang)) {
|
||||
langSet.add(Constants.ALL_LANGUAGES);
|
||||
} else {
|
||||
final String normalizeLang = systemHelper
|
||||
.normalizeLang(lang);
|
||||
if (normalizeLang != null) {
|
||||
langSet.add(normalizeLang);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (langSet.size() > 1 && langSet.contains(Constants.ALL_LANGUAGES)) {
|
||||
langSet.clear();
|
||||
indexForm.lang = new String[] { Constants.ALL_LANGUAGES };
|
||||
} else {
|
||||
langSet.remove(Constants.ALL_LANGUAGES);
|
||||
}
|
||||
appendLangQuery(queryBuf, langSet);
|
||||
} else if (Constants.TRUE.equals(crawlerProperties.getProperty(
|
||||
Constants.USE_BROWSER_LOCALE_FOR_SEARCH_PROPERTY,
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
<p id="searchOptionMenu" class="ellipsis">
|
||||
<span>
|
||||
<bean:message key="labels.searchoptions_menu_sort" />
|
||||
<a href="#searchOptions" data-toggle="modal">
|
||||
<c:if test="${empty sort}"><bean:message key="labels.searchoptions_score" /></c:if>
|
||||
<c:if test="${sort=='created.asc'}"><bean:message key="labels.search_result_sort_created_asc" /></c:if>
|
||||
<c:if test="${sort=='created.desc'}"><bean:message key="labels.search_result_sort_created_desc" /></c:if>
|
||||
|
@ -36,13 +37,17 @@
|
|||
<c:if test="${sort=='clickCount_l_x_dv.desc'}"><bean:message key="labels.search_result_sort_clickCount_desc" /></c:if>
|
||||
<c:if test="${sort=='favoriteCount_l_x_dv.asc'}"><bean:message key="labels.search_result_sort_favoriteCount_asc" /></c:if>
|
||||
<c:if test="${sort=='favoriteCount_l_x_dv.desc'}"><bean:message key="labels.search_result_sort_favoriteCount_desc" /></c:if>
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
<bean:message key="labels.searchoptions_menu_num" />
|
||||
<a href="#searchOptions" data-toggle="modal">
|
||||
<bean:message key="labels.searchoptions_num" arg0="${f:h(num)}" />
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
<bean:message key="labels.searchoptions_menu_lang" />
|
||||
<a href="#searchOptions" data-toggle="modal">
|
||||
<c:if test="${empty lang}"><bean:message key="labels.searchoptions_all" /></c:if>
|
||||
<c:if test="${!empty lang}">
|
||||
<c:forEach var="sLang" items="${lang}">
|
||||
|
@ -51,10 +56,12 @@
|
|||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</a>
|
||||
</span>
|
||||
<c:if test="${displayLabelTypeItems}">
|
||||
<span>
|
||||
<bean:message key="labels.searchoptions_menu_labels" />
|
||||
<a href="#searchOptions" data-toggle="modal">
|
||||
<c:if test="${empty fields.label}"><bean:message key="labels.searchoptions_all" /></c:if>
|
||||
<c:if test="${!empty fields.label}">
|
||||
<c:forEach var="sLabel" items="${fields.label}">
|
||||
|
@ -63,6 +70,7 @@
|
|||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</a>
|
||||
</span>
|
||||
</c:if>
|
||||
</p>
|
||||
|
|
Loading…
Add table
Reference in a new issue