aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers/Site.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-12-25 15:06:38 +0300
committerGravatar Vitaly Takmazov2020-12-25 15:06:38 +0300
commit4ba4e27308fa963e96669912ead9bf91a06a9dba (patch)
treec0687af4d6067919588acecd7c83a91a55c2eac9 /src/main/java/com/juick/www/controllers/Site.java
parent1a7423501e2005b332d06ec33a71f0a2d2108433 (diff)
Refactoring
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Site.java')
-rw-r--r--src/main/java/com/juick/www/controllers/Site.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java
index 0cc0abfe..1e308f6a 100644
--- a/src/main/java/com/juick/www/controllers/Site.java
+++ b/src/main/java/com/juick/www/controllers/Site.java
@@ -30,7 +30,6 @@ import com.juick.util.MessageUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.apache.commons.text.StringEscapeUtils;
-import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@@ -92,6 +91,7 @@ public class Site {
@GetMapping("/")
protected String doGet(
@Visitor User visitor,
+ Locale locale,
@RequestParam(required = false) String tag,
@RequestParam(name = "show", required = false) String paramShow,
@RequestParam(name = "search", required = false) String paramSearch,
@@ -113,8 +113,6 @@ public class Site {
String title;
List<Integer> mids;
- Locale locale = LocaleContextHolder.getLocale();
-
if (paramSearch != null) {
String searchTitle = ResourceBundle.getBundle("messages", locale).getString("title.search");
title = searchTitle + StringEscapeUtils.escapeHtml4(paramSearch);