From 59fd361edab0f28991e9ded0c87ed70b7011001c Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Mon, 12 Dec 2016 19:44:06 +0700 Subject: no need to add visitor to model --- .../src/main/java/com/juick/www/controllers/HelpController.java | 1 - .../src/main/java/com/juick/www/controllers/IndexController.java | 1 - .../src/main/java/com/juick/www/controllers/PMController.java | 1 - .../src/main/java/com/juick/www/controllers/SettingsController.java | 1 - .../src/main/java/com/juick/www/controllers/TagController.java | 1 - 5 files changed, 5 deletions(-) (limited to 'juick-spring-www/src/main/java/com/juick') diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/HelpController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/HelpController.java index 7b1ec4d9..3387f821 100644 --- a/juick-spring-www/src/main/java/com/juick/www/controllers/HelpController.java +++ b/juick-spring-www/src/main/java/com/juick/www/controllers/HelpController.java @@ -61,7 +61,6 @@ public class HelpController { model.addAttribute("help_nav", navigation); model.addAttribute("help_data", content); - model.addAttribute("visitor", UserUtils.getCurrentUser()); return "views/help"; } diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java index 4df4d350..7821a916 100644 --- a/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java +++ b/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java @@ -94,7 +94,6 @@ public class IndexController { mids = messagesService.getAll(visitor.getUid(), before); } model.addAttribute("title", title); - model.addAttribute("visitor", visitor); model.addAttribute("tags", tagService.getPopularTags()); model.addAttribute("showAdv", true); List msgs = messagesService.getMessages(mids); diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java index d40e7aaf..fc5937dd 100644 --- a/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java +++ b/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java @@ -49,7 +49,6 @@ public class PMController { msgs.forEach(m -> m.setText(MessageUtils.formatMessage(m.getText()))); context.put("title", title); - context.put("visitor", visitor); context.put("msgs", msgs); context.put("tags", tagService.getPopularTags()); diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java index d150d71e..e7319fb9 100644 --- a/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java +++ b/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java @@ -76,7 +76,6 @@ public class SettingsController { page = "main"; } context.put("title", "Настройки"); - context.put("visitor", visitor); context.put("tags", tagService.getPopularTags()); context.put("auths", userService.getAuthCodes(visitor)); context.put("eopts", userService.getEmailOpts(visitor)); diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/TagController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/TagController.java index f61928a7..67f38a35 100644 --- a/juick-spring-www/src/main/java/com/juick/www/controllers/TagController.java +++ b/juick-spring-www/src/main/java/com/juick/www/controllers/TagController.java @@ -85,7 +85,6 @@ public class TagController { ad_mid = 0; } } - model.addAttribute("visitor", visitor); List msgs = messagesService.getMessages(mids); List blUIDs = userService.checkBL(visitor_uid, msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList())); -- cgit v1.2.3