aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/www')
-rw-r--r--src/main/java/com/juick/www/api/Messages.java4
-rw-r--r--src/main/java/com/juick/www/controllers/Site.java12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/juick/www/api/Messages.java b/src/main/java/com/juick/www/api/Messages.java
index 7b54f126..06e3ac87 100644
--- a/src/main/java/com/juick/www/api/Messages.java
+++ b/src/main/java/com/juick/www/api/Messages.java
@@ -96,7 +96,7 @@ public class Messages {
} else if (StringUtils.hasText(tag)) {
Tag tagObject = tagService.getTag(tag, false);
if (tagObject != null) {
- mids = messagesService.getUserTag(user.getUid(), tagObject.TID, 0, before);
+ mids = messagesService.getUserTag(user.getUid(), tagObject.getId(), 0, before);
} else {
throw new HttpNotFoundException();
}
@@ -121,7 +121,7 @@ public class Messages {
} else if (StringUtils.hasText(tag)) {
Tag tagObject = tagService.getTag(tag, false);
if (tagObject != null) {
- mids = messagesService.getTag(tagObject.TID, visitor.getUid(), before, 20);
+ mids = messagesService.getTag(tagObject.getId(), visitor.getUid(), before, 20);
} else {
throw new HttpNotFoundException();
}
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java
index d0ea3dee..eb483ccc 100644
--- a/src/main/java/com/juick/www/controllers/Site.java
+++ b/src/main/java/com/juick/www/controllers/Site.java
@@ -267,7 +267,7 @@ public class Site {
if (paramShow == null) {
if (paramTag != null) {
title = "Блог " + user.getName() + ": *" + StringEscapeUtils.escapeHtml4(paramTag.getName());
- mids = messagesService.getUserTag(user.getUid(), paramTag.TID, privacy, before);
+ mids = messagesService.getUserTag(user.getUid(), paramTag.getId(), privacy, before);
} else if (paramSearch != null) {
title = "Блог " + user.getName() + ": " + StringEscapeUtils.escapeHtml4(paramSearch);
mids = messagesService.getUserSearch(visitor, user.getUid(), paramSearch,
@@ -289,7 +289,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.TID)) {
+ if (paramTag != null && tagService.getTagNoIndex(paramTag.getId())) {
head += "<meta name=\"robots\" content=\"noindex,nofollow\"/>";
} else if (before > 0 || paramShow != null) {
head += "<meta name=\"robots\" content=\"noindex\"/>";
@@ -402,8 +402,8 @@ public class Site {
Tag paramTag = tagService.getTag(paramTagStr, false);
if (paramTag == null) {
throw new HttpNotFoundException();
- } else if (paramTag.SynonymID > 0 && paramTag.TID != paramTag.SynonymID) {
- Tag synTag = tagService.getTag(paramTag.SynonymID);
+ } else if (paramTag.getSynonymId() > 0 && paramTag.getId() != paramTag.getSynonymId()) {
+ Tag synTag = tagService.getTag(paramTag.getSynonymId());
String url = "/tag/"
+ URLEncoder.encode(StringEscapeUtils.escapeHtml4(synTag.getName()), StandardCharsets.UTF_8);
if (request.getQueryString() != null) {
@@ -421,7 +421,7 @@ public class Site {
String title = "*" + StringEscapeUtils.escapeHtml4(paramTag.getName());
model.addAttribute("title", title);
- List<Integer> mids = messagesService.getTag(paramTag.TID, visitor.getUid(), before,
+ List<Integer> mids = messagesService.getTag(paramTag.getId(), visitor.getUid(), before,
(visitor.isAnonymous()) ? 40 : 20);
List<Message> msgs = messagesService.getMessages(visitor.getUid(), mids);
msgs.forEach(m -> m.getUser().setAvatar(webApp.getAvatarWebPath(m.getUser())));
@@ -435,7 +435,7 @@ public class Site {
}
String head = StringUtils.EMPTY;
- if (tagService.getTagNoIndex(paramTag.TID)) {
+ if (tagService.getTagNoIndex(paramTag.getId())) {
head = "<meta name=\"robots\" content=\"noindex,nofollow\"/>";
} else if (before > 0 || mids.size() < 5) {
head = "<meta name=\"robots\" content=\"noindex\"/>";