aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-04-20 14:12:55 +0700
committerGravatar Ugnich Anton2014-04-20 14:12:55 +0700
commit9d4dd4e844fbe7aa74bbabf7bbdd32989472bbc0 (patch)
tree1bf233eab5c9cdedcfbab25ab86caf84c276050c /src/java/com/juick
parente95f13c44bef12e9f95505c6d066dfa7d48edef8 (diff)
UserThread: nofollow, canonical
Diffstat (limited to 'src/java/com/juick')
-rw-r--r--src/java/com/juick/http/www/UserThread.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java
index 93a793c5..efec8899 100644
--- a/src/java/com/juick/http/www/UserThread.java
+++ b/src/java/com/juick/http/www/UserThread.java
@@ -67,7 +67,11 @@ public class UserThread {
response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
try {
- PageTemplates.pageHead(out, title, "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + msg.User.UName + "\" href=\"//rss.juick.com/" + msg.User.UName + "/blog\"/>");
+ String headers = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + msg.User.UName + "\" href=\"//rss.juick.com/" + msg.User.UName + "/blog\"/>";
+ if (paramView != null) {
+ headers += "<link rel=\"canonical\" href=\"http://juick.com/" + msg.User.UName + "/" + msg.MID + "\"/>";
+ }
+ PageTemplates.pageHead(out, title, headers);
if (!Utils.isMobileRequest(request)) {
PageTemplates.pageNavigation(out, visitor, null);
@@ -243,12 +247,12 @@ public class UserThread {
out.println("<div class=\"title2\">");
out.print(" <div class=\"title2-right\">");
if (listview) {
- out.print("<a href=\"?view=tree\">Показать деревом</a>");
+ out.print("<a href=\"?view=tree\" rel=\"nofollow\">Показать деревом</a>");
} else {
if (foldable) {
out.print("<span id=\"unfoldall\"><a href=\"#\" onclick=\"$('#replies>li').show(); $('#replies .msg-comments').hide(); $('#unfoldall').hide(); return false\">Раскрыть все</a> &#183; </span>");
}
- out.print("<a href=\"?view=list\">Показать списком</a>");
+ out.print("<a href=\"?view=list\" rel=\"nofollow\">Показать списком</a>");
}
out.print("</div>");
out.println(" <h2>Ответы (" + replies.size() + ")</h2>");