aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/User.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/User.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/User.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/juick-www/src/main/java/com/juick/www/User.java b/juick-www/src/main/java/com/juick/www/User.java
index ae1aee2a..f782d988 100644
--- a/juick-www/src/main/java/com/juick/www/User.java
+++ b/juick-www/src/main/java/com/juick/www/User.java
@@ -77,7 +77,7 @@ public class User {
}
int privacy = 0;
- if (visitor != null) {
+ if (visitor.getUID() > 0) {
if (user.getUID() == visitor.getUID() || visitor.getUID() == 1) {
privacy = -3;
} else if (UserQueries.isInWL(sql, user.getUID(), visitor.getUID())) {
@@ -108,7 +108,7 @@ public class User {
return;
}
- if (visitor == null) {
+ if (visitor.getUID() == 0) {
pageUserRefCookie(request, response, user.getUID());
}
@@ -131,7 +131,7 @@ public class User {
out.println("<p class=\"page\"><a href=\"/tag/" + URLEncoder.encode(paramTag.Name, "UTF-8") + "\">← Все записи с тегом <b>" + Utils.encodeHTML(paramTag.Name) + "</b></a></p>");
}
- PageTemplates.printMessages(out, sql, user, mids, visitor, visitor == null ? 4 : 5, 0);
+ PageTemplates.printMessages(out, sql, user, mids, visitor, visitor.getUID() == 0 ? 4 : 5, 0);
if (mids.size() >= 20) {
String nextpage = "?before=" + mids.get(mids.size() - 1);
@@ -181,7 +181,7 @@ public class User {
protected void doGetFriends(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response, com.juick.User user) throws ServletException, IOException {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor == null) {
+ if (visitor.getUID() == 0) {
pageUserRefCookie(request, response, user.getUID());
}
@@ -216,7 +216,7 @@ public class User {
protected void doGetReaders(JdbcTemplate sql, HttpServletRequest request, HttpServletResponse response, com.juick.User user) throws ServletException, IOException {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor == null) {
+ if (visitor.getUID() == 0) {
pageUserRefCookie(request, response, user.getUID());
}
@@ -263,7 +263,7 @@ public class User {
public static void pageUserColumn(PrintWriter out, JdbcTemplate sql, com.juick.User user, com.juick.User visitor) {
out.println("<aside id=\"column\">");
out.println(" <div id=\"ctitle\"><a href=\"./\"><img src=\"//i.juick.com/as/" + user.getUID() + ".png\" alt=\"\"/>" + user.getUName() + "</a></div>");
- if (visitor != null && visitor.getUID() > 0 && visitor.getUID() != user.getUID()) {
+ if (visitor.getUID() > 0 && visitor.getUID() != user.getUID()) {
out.println(" <ul id=\"ctoolbar\">");
if (UserQueries.isSubscribed(sql, visitor.getUID(), user.getUID())) {
out.println(" <li><a href=\"/post?body=U+%40" + user.getUName() + "\" title=\"Подписан\"><div style=\"background-position: -48px 0\"></div></a></li>");