aboutsummaryrefslogtreecommitdiff
path: root/juick-server-jdbc
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-05-25 21:00:36 +0300
committerGravatar Vitaly Takmazov2018-05-25 21:00:36 +0300
commit7f181f590fbc7b2062a5348a3b050d7cf884a135 (patch)
tree3e6d8156faee3283e506ffa8dbaa58be21643244 /juick-server-jdbc
parentbc32308c2802b239d9741c994ebe2b2287d5504b (diff)
TopManager: *NSFW should not appear in Top
Diffstat (limited to 'juick-server-jdbc')
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
index 612431bf..35e48383 100644
--- a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -978,7 +978,8 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
return getJdbcTemplate().queryForList("SELECT replies.message_id FROM replies " +
"INNER JOIN messages ON replies.message_id = messages.message_id " +
"LEFT JOIN messages_tags ON messages_tags.message_id = messages.message_id " +
- "WHERE COALESCE(messages_tags.tag_id, 0) != 2 AND replies.ts > TIMESTAMPADD(HOUR, -2, CURRENT_TIMESTAMP) " +
+ "WHERE COALESCE(messages_tags.tag_id, 0) != 2 " +
+ "AND COALESCE(messages_tags.tag_id, 0) != 805 AND replies.ts > TIMESTAMPADD(HOUR, -2, CURRENT_TIMESTAMP) " +
"AND messages.popular=0 GROUP BY messages.message_id having COUNT(DISTINCT(replies.user_id)) > 5 " +
"UNION ALL SELECT favorites.message_id FROM favorites " +
"INNER JOIN messages ON messages.message_id = favorites.message_id " +