aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/User.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-01-31 04:09:38 +0700
committerGravatar Ugnich Anton2014-01-31 04:09:38 +0700
commitcd7016bd09dd1fc21f375765d5cc510a1ad0656b (patch)
tree4ac7841312727ed6a5f9b11c6fd6d822693743db /src/java/com/juick/http/www/User.java
parent80dc112383a88def23eb95e34e3d7f739994bd3b (diff)
/tag/ canonical
Diffstat (limited to 'src/java/com/juick/http/www/User.java')
-rw-r--r--src/java/com/juick/http/www/User.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java
index 51a282d2..d29ae767 100644
--- a/src/java/com/juick/http/www/User.java
+++ b/src/java/com/juick/http/www/User.java
@@ -52,10 +52,10 @@ public class User {
String paramShow = request.getParameter("show");
- int paramTag = 0;
+ com.juick.Tag paramTag = null;
String paramTagStr = request.getParameter("tag");
if (paramTagStr != null && paramTagStr.length() < 64) {
- paramTag = TagQueries.getTagID(sql, paramTagStr, false);
+ paramTag = TagQueries.getTag(sql, paramTagStr, false);
}
int paramBefore = 0;
@@ -82,9 +82,9 @@ public class User {
}
if (paramShow == null) {
- if (paramTag > 0) {
- title += "*" + Utils.encodeHTML(paramTagStr);
- mids = MessagesQueries.getUserTag(sql, user.UID, paramTag, privacy, paramBefore);
+ if (paramTag != null) {
+ title += "*" + Utils.encodeHTML(paramTag.Name);
+ mids = MessagesQueries.getUserTag(sql, user.UID, paramTag.TID, privacy, paramBefore);
} else if (paramSearch != null) {
title += rb.getString("(Menu) Search") + ": " + Utils.encodeHTML(paramSearch);
mids = MessagesQueries.getUserSearch(sql, sqlSearch, user.UID, Utils.encodeSphinx(paramSearch), privacy, paramBefore);
@@ -123,8 +123,8 @@ public class User {
if (paramShow != null) {
nextpage += "&amp;show=" + paramShow;
}
- if (paramTag > 0) {
- nextpage += "&amp;tag=" + URLEncoder.encode(paramTagStr, "UTF-8");
+ if (paramTag != null) {
+ nextpage += "&amp;tag=" + URLEncoder.encode(paramTag.Name, "UTF-8");
}
if (paramSearch != null) {
nextpage += "&amp;search=" + URLEncoder.encode(paramSearch, "UTF-8");