From dd4ea16baae17bf48045b2ac4f05c036cdc9496c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 18 Aug 2017 14:11:14 +0300 Subject: www: fix noindex usage --- juick-www/src/main/java/com/juick/www/controllers/Home.java | 2 +- juick-www/src/main/java/com/juick/www/controllers/Tags.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'juick-www/src/main/java/com/juick/www/controllers') diff --git a/juick-www/src/main/java/com/juick/www/controllers/Home.java b/juick-www/src/main/java/com/juick/www/controllers/Home.java index 912140a22..7a019af8f 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/Home.java +++ b/juick-www/src/main/java/com/juick/www/controllers/Home.java @@ -163,7 +163,7 @@ public class Home { model.addAttribute("title", title); model.addAttribute("headers", head); model.addAttribute("visitor", visitor); - model.addAttribute("noindex", paramShow == null && paramBefore == 0); + model.addAttribute("noindex", !(paramShow == null && paramBefore == 0)); List msgs = messagesService.getMessages(mids); if (visitor.getUid() != 0) { diff --git a/juick-www/src/main/java/com/juick/www/controllers/Tags.java b/juick-www/src/main/java/com/juick/www/controllers/Tags.java index acab10059..eef317a99 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/Tags.java +++ b/juick-www/src/main/java/com/juick/www/controllers/Tags.java @@ -100,6 +100,7 @@ public class Tags { model.addAttribute("msgs", msgs); model.addAttribute("tags", tagService.getPopularTags()); model.addAttribute("headers", head); + model.addAttribute("noindex", before > 0); model.addAttribute("showAdv",before == 0 && visitor.getUid() == 0); model.addAttribute("isModerator", visitor.getUid() == 3694); if (mids.size() >= 20) { -- cgit v1.2.3