From a573191fa752c0d9155f1c9f0d8a89f044c7af7a Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sat, 8 Mar 2014 16:24:44 +0700 Subject: redirect /?show=top --- src/java/com/juick/http/www/Home.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java index 86f1ee26..a49c2a53 100644 --- a/src/java/com/juick/http/www/Home.java +++ b/src/java/com/juick/http/www/Home.java @@ -56,13 +56,16 @@ public class Home { if (paramSearch != null) { title = "Поиск: " + Utils.encodeHTML(paramSearch); mids = MessagesQueries.getSearch(sql, sqlSearch, Utils.encodeSphinx(paramSearch), paramBefore); - } else if (paramShow == null || paramShow.equals("top")) { + } else if (paramShow == null) { if (visitor != null) { title = "Популярные"; } else { title = "Микроблоги Juick: популярные записи"; } mids = MessagesQueries.getPopular(sql, paramBefore); + } else if (paramShow.equals("top")) { + Utils.sendPermanentRedirect(response, "/"); + return; } else if (paramShow.equals("my") && visitor != null) { title = "Моя лента"; mids = MessagesQueries.getMyFeed(sql, visitor.UID, paramBefore); -- cgit v1.2.3