aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/Messages.java21
1 files changed, 2 insertions, 19 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/Messages.java b/juick-www/src/main/java/com/juick/www/controllers/Messages.java
index c83bb356..11dafda3 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/Messages.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/Messages.java
@@ -506,8 +506,8 @@ public class Messages {
protected String threadAction(ModelMap model,
@PathVariable String uname,
@PathVariable int mid,
- @CookieValue(name = "sape_cookie", required = false, defaultValue = StringUtils.EMPTY) String sapeCookie,
- @RequestParam(required = false, value = "view") String paramView) {
+ @CookieValue(name = "sape_cookie",
+ required = false, defaultValue = StringUtils.EMPTY) String sapeCookie) {
com.juick.User visitor = UserUtils.getCurrentUser();
if (!messagesService.canViewThread(mid, visitor.getUid())) {
@@ -533,29 +533,12 @@ public class Messages {
}
model.addAttribute("msg", msg);
- boolean listview = false;
- if (paramView != null) {
- if (paramView.equals("list")) {
- listview = true;
- if (visitor.getUid() > 0) {
- userService.setUserOptionInt(visitor.getUid(), "repliesview", 1);
- }
- } else if (paramView.equals("tree") && visitor.getUid() > 0) {
- userService.setUserOptionInt(visitor.getUid(), "repliesview", 0);
- }
- } else if (visitor.getUid() > 0 && userService.getUserOptionInt(visitor.getUid(), "repliesview", 0) == 1) {
- listview = true;
- }
- model.addAttribute("listview", listview);
String title = msg.getUser().getName() + ": " + msg.getTagsString();
model.addAttribute("title", title);
model.addAttribute("visitor", visitor);
String headers = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + msg.getUser().getName() + "\" href=\"//rss.juick.com/" + msg.getUser().getName() + "/blog\"/>";
String pageUrl = "https://juick.com/" + msg.getUser().getName() + "/" + msg.getMid();
- if (paramView != null) {
- headers += "<link rel=\"canonical\" href=\"" + pageUrl + "\"/>";
- }
if (msg.Hidden) {
headers += "<meta name=\"robots\" content=\"noindex\"/>";
}