aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/controllers
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-02-03 02:13:17 +0300
committerGravatar Vitaly Takmazov2023-02-03 03:39:43 +0300
commit22aaf28c779725962a3ebec3e689bef35fe05085 (patch)
tree71e05ad64efc73dff7ba3d6688a567493bc88c09 /src/main/java/com/juick/www/controllers
parentd71ce6095b87958d2df4da27b1344ad0e5b77a44 (diff)
GetTagNoIndex -> tag.isNotIndexed
Diffstat (limited to 'src/main/java/com/juick/www/controllers')
-rw-r--r--src/main/java/com/juick/www/controllers/Site.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java
index 49736a60..2a1c89ae 100644
--- a/src/main/java/com/juick/www/controllers/Site.java
+++ b/src/main/java/com/juick/www/controllers/Site.java
@@ -33,7 +33,6 @@ import jakarta.servlet.http.HttpSession;
import com.juick.service.*;
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.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
@@ -50,7 +49,6 @@ import javax.inject.Inject;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
import java.util.Locale;
import java.util.Optional;
@@ -289,7 +287,7 @@ public class Site {
String head = "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"@" + user.getName()
+ "\" href=\"//rss.juick.com/" + user.getName() + "/blog\"/>";
head += "<meta name=\"Description\" content=\"" + title + "\" />\n";
- if (paramTag != null && tagService.getTagNoIndex(paramTag.getId())) {
+ if (paramTag != null && tagService.getTag(paramTag.getId()).isNotIndexed()) {
head += "<meta name=\"robots\" content=\"noindex,nofollow\"/>";
} else if (before > 0 || paramShow != null) {
head += "<meta name=\"robots\" content=\"noindex\"/>";
@@ -435,7 +433,7 @@ public class Site {
}
String head = StringUtils.EMPTY;
- if (tagService.getTagNoIndex(paramTag.getId())) {
+ if (tagService.getTag(paramTag.getId()).isNotIndexed()) {
head = "<meta name=\"robots\" content=\"noindex,nofollow\"/>";
} else if (before > 0 || mids.size() < 5) {
head = "<meta name=\"robots\" content=\"noindex\"/>";