diff options
author | Vitaly Takmazov | 2018-03-07 14:53:23 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-13 08:12:18 +0300 |
commit | 1f5869fcfe8c537d223b750754025cb2937d4bad (patch) | |
tree | adb9e8f12e41eb4f2659ea4079c05729d42f33c1 /juick-www/src/main/java/com/juick/www | |
parent | c25f908aa587a60912f7350806e54de2b7f3dc04 (diff) |
drop replies tree
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/Messages.java | 21 |
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\"/>"; } |