aboutsummaryrefslogtreecommitdiff
path: root/juick-core/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-14 12:10:33 +0300
committerGravatar Vitaly Takmazov2016-07-14 12:10:33 +0300
commit7fbaabbc4a46a0fc739fa3be4252d24c1c26ff2b (patch)
tree071dbfad113001f0b94bed9d74476f32ebc7f370 /juick-core/src/main/java/com/juick
parentd8af0bae55e6d32440cd9faa65674a0ae239968e (diff)
parent34699029c1a42e7a8ea30df57370401801a64eae (diff)
Merge branch 'master' of ssh://den.jabber.ru:2205/var/lib/git/com.juick.http.www
Diffstat (limited to 'juick-core/src/main/java/com/juick')
-rw-r--r--juick-core/src/main/java/com/juick/server/UserQueries.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-core/src/main/java/com/juick/server/UserQueries.java b/juick-core/src/main/java/com/juick/server/UserQueries.java
index 97d40968..b79f179c 100644
--- a/juick-core/src/main/java/com/juick/server/UserQueries.java
+++ b/juick-core/src/main/java/com/juick/server/UserQueries.java
@@ -126,7 +126,7 @@ public class UserQueries {
public static List<User> getUsersByName(JdbcTemplate sql, List<String> unames) {
if (!unames.isEmpty()) {
- return sql.query("SELECT id,nick,banned FROM users WHERE nick IN (" + StringUtils.arrayToCommaDelimitedString(unames.toArray()) + ")",
+ return sql.query("SELECT id,nick,banned FROM users WHERE nick IN (\"" + StringUtils.arrayToDelimitedString(unames.toArray(), "\",\"") + "\")",
new UserMapper());
}
return Collections.emptyList();
@@ -144,7 +144,7 @@ public class UserQueries {
if (!jids.isEmpty()) {
return sql.query("SELECT users.id,users.nick,jids.jid FROM users "
+ "INNER JOIN jids ON jids.user_id=users.id "
- + "WHERE jids.jid IN (" + StringUtils.arrayToCommaDelimitedString(jids.toArray()) + ")",
+ + "WHERE jids.jid IN (\"" + StringUtils.arrayToDelimitedString(jids.toArray(), "\",\"") + "\")",
(rs, rowNum) -> {
com.juick.User user = new com.juick.User();
user.setUID(rs.getInt(1));