aboutsummaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-10-14 11:51:31 +0700
committerGravatar Ugnich Anton2012-10-14 11:51:31 +0700
commitbde1bae2a20811cb650608b49459c18f837ba9a5 (patch)
tree4005fcb08c26b6fc7e274927b5c0bba608c5d199 /src/com
parent6df2be1e680adb8f9c8a186fae05dd7357280c95 (diff)
getMessageRecommendations ArrayList
Diffstat (limited to 'src/com')
-rw-r--r--src/com/juick/server/MessagesQueries.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/com/juick/server/MessagesQueries.java b/src/com/juick/server/MessagesQueries.java
index 3ec412b0..80d7a280 100644
--- a/src/com/juick/server/MessagesQueries.java
+++ b/src/com/juick/server/MessagesQueries.java
@@ -160,8 +160,8 @@ public class MessagesQueries {
return user;
}
- public static String getMessageRecommendations(Connection sql, int mid) {
- String ret = "";
+ public static ArrayList<String> getMessageRecommendations(Connection sql, int mid) {
+ ArrayList<String> users = new ArrayList<String>();
PreparedStatement stmt = null;
ResultSet rs = null;
@@ -171,10 +171,7 @@ public class MessagesQueries {
rs = stmt.executeQuery();
rs.beforeFirst();
while (rs.next()) {
- if (!ret.isEmpty()) {
- ret += ", ";
- }
- ret += "<a href=\"/" + rs.getString(1) + "/\">@" + rs.getString(1) + "</a>";
+ users.add(rs.getString(1));
}
} catch (SQLException e) {
System.err.println(e);
@@ -182,7 +179,7 @@ public class MessagesQueries {
Utils.finishSQL(rs, stmt);
}
- return ret;
+ return users;
}
public static ArrayList<Integer> getAll(Connection sql, int before) {