aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-06-05 12:17:52 +0300
committerGravatar Vitaly Takmazov2020-06-05 12:17:52 +0300
commit85c5c69ffb5a14258eafb4c67c550f6018b3c621 (patch)
treee7f3f6ef8680aad33ed0802ca681821cbfe69cca /src/main/java/com/juick/www/controllers
parent63a52408f430cb2109943c18c37adef5c3bd8da0 (diff)
Append * to keyword search
Diffstat (limited to 'src/main/java/com/juick/www/controllers')
-rw-r--r--src/main/java/com/juick/www/controllers/Site.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java
index 537b0a6e..00b47000 100644
--- a/src/main/java/com/juick/www/controllers/Site.java
+++ b/src/main/java/com/juick/www/controllers/Site.java
@@ -108,7 +108,7 @@ public class Site {
if (paramSearch != null) {
title = "Поиск: " + StringEscapeUtils.escapeHtml4(paramSearch);
- mids = messagesService.getSearch(visitor, WebUtils.encodeSphinx(paramSearch), page);
+ mids = messagesService.getSearch(visitor, WebUtils.encodeSphinx(paramSearch), page, false);
} else if (paramShow == null) {
title = "Обсуждения";
mids = messagesService.getDiscussions(visitor.getUid(), paramTo);
@@ -194,8 +194,11 @@ public class Site {
List<Integer> mids;
+ boolean isTagSearch = false;
+
if (paramTagStr != null) {
paramSearch = paramTagStr;
+ isTagSearch = true;
}
if (paramSearch != null && paramSearch.length() > 64) {
paramSearch = null;
@@ -214,7 +217,8 @@ public class Site {
if (paramShow == null) {
if (paramSearch != null) {
title = "Блог " + user.getName() + ": " + StringEscapeUtils.escapeHtml4(paramSearch);
- mids = messagesService.getUserSearch(visitor, user.getUid(), WebUtils.encodeSphinx(paramSearch), privacy, page);
+ mids = messagesService.getUserSearch(visitor, user.getUid(), WebUtils.encodeSphinx(paramSearch),
+ privacy, page, isTagSearch);
} else {
title = "Блог " + user.getName();
mids = messagesService.getUserBlog(user.getUid(), privacy, before);