aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Discover.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Discover.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Discover.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Discover.java b/juick-www/src/main/java/com/juick/www/Discover.java
index 238af0fb..1811951b 100644
--- a/juick-www/src/main/java/com/juick/www/Discover.java
+++ b/juick-www/src/main/java/com/juick/www/Discover.java
@@ -71,10 +71,10 @@ public class Discover {
}
}
- int visitor_uid = visitor != null ? visitor.getUID() : 0;
+ int visitor_uid = visitor.getUID();
String title = "*" + Utils.encodeHTML(paramTag.Name);
- List<Integer> mids = MessagesQueries.getTag(sql, paramTag.TID, visitor_uid, paramBefore, (visitor == null) ? 40 : 20);
+ List<Integer> mids = MessagesQueries.getTag(sql, paramTag.TID, visitor_uid, paramBefore, (visitor_uid == 0) ? 40 : 20);
response.setContentType("text/html; charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
@@ -100,7 +100,7 @@ public class Discover {
ad_mid = 0;
}
- PageTemplates.printMessages(out, sql, null, mids, visitor, visitor == null ? 2 : 3, ad_mid);
+ PageTemplates.printMessages(out, sql, null, mids, visitor, visitor_uid == 0 ? 2 : 3, ad_mid);
}
if (mids.size() >= 20) {