aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/User.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/User.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/User.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/juick-www/src/main/java/com/juick/www/User.java b/juick-www/src/main/java/com/juick/www/User.java
index ce2a5826..0d0056ad 100644
--- a/juick-www/src/main/java/com/juick/www/User.java
+++ b/juick-www/src/main/java/com/juick/www/User.java
@@ -55,8 +55,8 @@ public class User {
if (paramTag == null) {
Errors.doGet404(sql, request, response);
return;
- } else if (!paramTag.Name.equals(paramTagStr)) {
- String url = "/" + user.getUName() + "/?tag=" + URLEncoder.encode(paramTag.Name, "UTF-8");
+ } else if (!paramTag.getName().equals(paramTagStr)) {
+ String url = "/" + user.getUName() + "/?tag=" + URLEncoder.encode(paramTag.getName(), "UTF-8");
Utils.sendPermanentRedirect(response, url);
return;
}
@@ -88,7 +88,7 @@ public class User {
String title;
if (paramShow == null) {
if (paramTag != null) {
- title = "Блог " + user.getUName() + ": *" + Utils.encodeHTML(paramTag.Name);
+ title = "Блог " + user.getUName() + ": *" + Utils.encodeHTML(paramTag.getName());
mids = MessagesQueries.getUserTag(sql, user.getUID(), paramTag.TID, privacy, paramBefore);
} else if (paramSearch != null) {
title = "Блог " + user.getUName() + ": " + Utils.encodeHTML(paramSearch);
@@ -114,7 +114,8 @@ public class User {
response.setContentType("text/html; charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
- String head = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + user.getUName() + "\" href=\"//rss.juick.com/" + user.getUName() + "/blog\"/>";
+ String head = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" +
+ user.getUName() + "\" href=\"//rss.juick.com/" + user.getUName() + "/blog\"/>";
if (paramTag != null && TagQueries.getTagNoIndex(sql, paramTag.TID)) {
head += "<meta name=\"robots\" content=\"noindex,nofollow\"/>";
} else if (paramBefore > 0 || paramShow != null) {
@@ -128,7 +129,9 @@ public class User {
out.println("<section id=\"content\">");
if (paramTag != null) {
- out.println("<p class=\"page\"><a href=\"/tag/" + URLEncoder.encode(paramTag.Name, "UTF-8") + "\">← Все записи с тегом <b>" + Utils.encodeHTML(paramTag.Name) + "</b></a></p>");
+ out.println("<p class=\"page\"><a href=\"/tag/" +
+ URLEncoder.encode(paramTag.getName(), "UTF-8") + "\">← Все записи с тегом <b>" +
+ Utils.encodeHTML(paramTag.getName()) + "</b></a></p>");
}
PageTemplates.printMessages(out, sql, user, mids, visitor, visitor.getUID() == 0 ? 4 : 5, 0);
@@ -139,7 +142,7 @@ public class User {
nextpage += "&amp;show=" + paramShow;
}
if (paramTag != null) {
- nextpage += "&amp;tag=" + URLEncoder.encode(paramTag.Name, "UTF-8");
+ nextpage += "&amp;tag=" + URLEncoder.encode(paramTag.getName(), "UTF-8");
}
if (paramSearch != null) {
nextpage += "&amp;search=" + URLEncoder.encode(paramSearch, "UTF-8");
@@ -323,9 +326,9 @@ public class User {
String ret = "";
int count = cnt > 0 ? Math.min(tags.size(), cnt) : tags.size();
for (int i = 0; i < count; i++) {
- String tag = Utils.encodeHTML(tags.get(i).Name);
+ String tag = Utils.encodeHTML(tags.get(i).getName());
try {
- tag = "<a href=\"./?tag=" + URLEncoder.encode(tags.get(i).Name, "UTF-8") + "\" title=\""
+ tag = "<a href=\"./?tag=" + URLEncoder.encode(tags.get(i).getName(), "UTF-8") + "\" title=\""
+ tags.get(i).UsageCnt + "\" rel=\"nofollow\">" + tag + "</a>";
} catch (UnsupportedEncodingException e) {
}