aboutsummaryrefslogtreecommitdiff
path: root/src/com/juick/server/MessagesQueries.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/juick/server/MessagesQueries.java')
-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) {