aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-15 22:25:17 +0300
committerGravatar Vitaly Takmazov2016-07-15 22:25:28 +0300
commit86ff2faabe05ef8b856166455d2f9977afd778a1 (patch)
treedf456e60cb452aca4485d15d1a2beb8553838ba2 /juick-core/src/main/java
parentc8103ad9478f928e366b784ef95e4d92068ab4ed (diff)
fix replies query
Diffstat (limited to 'juick-core/src/main/java')
-rw-r--r--juick-core/src/main/java/com/juick/server/MessagesQueries.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-core/src/main/java/com/juick/server/MessagesQueries.java b/juick-core/src/main/java/com/juick/server/MessagesQueries.java
index 5659e79c..dfc3efbc 100644
--- a/juick-core/src/main/java/com/juick/server/MessagesQueries.java
+++ b/juick-core/src/main/java/com/juick/server/MessagesQueries.java
@@ -595,7 +595,7 @@ public class MessagesQueries {
}
public static List<com.juick.Message> getReplies(JdbcTemplate sql, int mid) {
- return sql.query("SELECT 0 as mid, replies.reply_id,replies.replyto, " +
+ return sql.query("SELECT ? as mid, replies.reply_id,replies.replyto, " +
"replies.user_id,users.nick,users.banned, " +
"TIMESTAMPDIFF(MINUTE,replies.ts,NOW()),replies.ts," +
"0 as readonly, 0 as privacy, 0 as replies," +
@@ -604,7 +604,7 @@ public class MessagesQueries {
"NULL as tags,NULL as repliesby, replies.txt " +
"FROM replies INNER JOIN users " +
"ON replies.user_id=users.id WHERE replies.message_id=? ORDER BY replies.reply_id ASC",
- new MessageMapper(), mid);
+ new MessageMapper(), mid, mid);
}
public static boolean setMessagePopular(JdbcTemplate sql, int mid, int popular) {