diff options
Diffstat (limited to 'src/main/java/com/juick/server/www/filters')
-rw-r--r-- | src/main/java/com/juick/server/www/filters/AnythingFilter.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/juick/server/www/filters/AnythingFilter.java b/src/main/java/com/juick/server/www/filters/AnythingFilter.java index cf484357..9a012089 100644 --- a/src/main/java/com/juick/server/www/filters/AnythingFilter.java +++ b/src/main/java/com/juick/server/www/filters/AnythingFilter.java @@ -17,6 +17,7 @@ package com.juick.server.www.filters; +import com.juick.model.User; import com.juick.server.util.WebUtils; import com.juick.service.MessagesService; import com.juick.service.UserService; @@ -59,7 +60,7 @@ public class AnythingFilter extends OncePerRequestFilter { if (isPostNumber && anything.equals(Integer.toString(messageId))) { if (messageId > 0) { - com.juick.User author = messagesService.getMessageAuthor(messageId); + User author = messagesService.getMessageAuthor(messageId); if (author != null) { servletResponse.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); @@ -68,14 +69,14 @@ public class AnythingFilter extends OncePerRequestFilter { } } } - com.juick.User user = userService.getUserByName(anything); + User user = userService.getUserByName(anything); if (user.getUid() > 0) { servletResponse.sendRedirect("/" + user.getName() + "/"); } else { filterChain.doFilter(servletRequest, servletResponse); } } else { - com.juick.User user = userService.getUserByName(anything); + User user = userService.getUserByName(anything); if (!user.isAnonymous()) { servletResponse.sendRedirect("/" + user.getName() + "/?before=" + before); } else { |