From 62d4f6f3fabe69b0e08195e99eedd72442bffa68 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 13 Sep 2018 15:45:52 +0300 Subject: hide banned from search --- juick-server/src/main/java/com/juick/server/api/Messages.java | 4 ++-- .../src/main/java/com/juick/server/www/controllers/MessagesWWW.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server') diff --git a/juick-server/src/main/java/com/juick/server/api/Messages.java b/juick-server/src/main/java/com/juick/server/api/Messages.java index 672f328f..e900810f 100644 --- a/juick-server/src/main/java/com/juick/server/api/Messages.java +++ b/juick-server/src/main/java/com/juick/server/api/Messages.java @@ -115,7 +115,7 @@ public class Messages { } else if (daysback > 0) { mids = messagesService.getUserBlogAtDay(user.getUid(), 0, daysback); } else if (!StringUtils.isEmpty(search)) { - mids = messagesService.getUserSearch(user.getUid(), Utils.encodeSphinx(search), 0, page); + mids = messagesService.getUserSearch(visitor, user.getUid(), Utils.encodeSphinx(search), 0, page); } else { mids = messagesService.getUserBlog(user.getUid(), 0, before); } @@ -135,7 +135,7 @@ public class Messages { return NOT_FOUND; } } else if (!StringUtils.isEmpty(search)) { - mids = messagesService.getSearch(Utils.encodeSphinx(search), page); + mids = messagesService.getSearch(visitor, Utils.encodeSphinx(search), page); } else { mids = messagesService.getAll(visitor.getUid(), before); } diff --git a/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java b/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java index 5083fd5a..130e1990 100644 --- a/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java +++ b/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java @@ -109,7 +109,7 @@ public class MessagesWWW { if (paramSearch != null) { title = "Поиск: " + StringEscapeUtils.escapeHtml4(paramSearch); - mids = messagesService.getSearch(Utils.encodeSphinx(paramSearch), page); + mids = messagesService.getSearch(visitor, Utils.encodeSphinx(paramSearch), page); } else if (paramShow == null) { title = "Обсуждения"; mids = messagesService.getDiscussions(visitor.getUid(), paramTo); @@ -237,7 +237,7 @@ public class MessagesWWW { mids = messagesService.getUserTag(user.getUid(), paramTag.TID, privacy, before); } else if (paramSearch != null) { title = "Блог " + user.getName() + ": " + StringEscapeUtils.escapeHtml4(paramSearch); - mids = messagesService.getUserSearch(user.getUid(), Utils.encodeSphinx(paramSearch), privacy, page); + mids = messagesService.getUserSearch(visitor, user.getUid(), Utils.encodeSphinx(paramSearch), privacy, page); } else { title = "Блог " + user.getName(); mids = messagesService.getUserBlog(user.getUid(), privacy, before); -- cgit v1.2.3