aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Main.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-15 14:21:27 +0300
committerGravatar Vitaly Takmazov2016-11-15 14:21:27 +0300
commit51d9de02265d6cc9d6045d79497d2a987ae2f7f7 (patch)
treed7dd2e534452cab45b8ebdba1e52c498951c5035 /juick-www/src/main/java/com/juick/www/Main.java
parent32a6feb195171e06d60117ad758cc8beb50e5ca3 (diff)
core classes are now serializeable with JAXB (to use as babbler extension)
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Main.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Main.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java
index 35617295..4a873cf3 100644
--- a/juick-www/src/main/java/com/juick/www/Main.java
+++ b/juick-www/src/main/java/com/juick/www/Main.java
@@ -172,7 +172,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
}
} else if (uri.equals("/post")) {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor.getUID() > 0) {
+ if (visitor.getUid() > 0) {
pagesNewMessage.doGetNewMessage(sql, request, response, visitor);
} else {
Utils.sendTemporaryRedirect(response, "/login");
@@ -185,7 +185,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
}
} else if (uri.startsWith("/pm/")) {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor.getUID() == 0) {
+ if (visitor.getUid() == 0) {
Utils.sendTemporaryRedirect(response, "/login");
} else {
switch (uri) {
@@ -269,7 +269,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
if (mid > 0) {
com.juick.User author = com.juick.server.MessagesQueries.getMessageAuthor(sql, mid);
if (author != null) {
- Utils.sendPermanentRedirect(response, "/" + author.getUName() + "/" + mid);
+ Utils.sendPermanentRedirect(response, "/" + author.getName() + "/" + mid);
return;
}
}
@@ -277,14 +277,14 @@ public class Main extends HttpServlet implements Stream.StreamListener {
} else if (uri.matches("^/[^/]+$")) {
com.juick.User user = com.juick.server.UserQueries.getUserByName(sql, request.getRequestURI().substring(1));
if (user != null) {
- Utils.sendPermanentRedirect(response, "/" + user.getUName() + "/");
+ Utils.sendPermanentRedirect(response, "/" + user.getName() + "/");
} else {
Errors.doGet404(sql, request, response);
}
} else if (uri.matches("^/.+/.*")) {
String uriparts[] = uri.split("/");
com.juick.User user = com.juick.server.UserQueries.getUserByName(sql, uriparts[1]);
- if (user != null && user.getUName().equals(uriparts[1]) && !user.Banned) {
+ if (user != null && user.getName().equals(uriparts[1]) && !user.isBanned()) {
if (uriparts.length == 2) { // http://juick.com/username/
pagesUser.doGetBlog(sql, sqlSearch, request, response, user);
} else if (uriparts[2].equals("tags")) {
@@ -302,8 +302,8 @@ public class Main extends HttpServlet implements Stream.StreamListener {
if (mid > 0) {
com.juick.User author = com.juick.server.MessagesQueries.getMessageAuthor(sql, mid);
if (author != null) {
- if (!author.getUName().equals(user.getUName())) {
- Utils.sendPermanentRedirect(response, "/" + author.getUName() + "/" + mid);
+ if (!author.getName().equals(user.getName())) {
+ Utils.sendPermanentRedirect(response, "/" + author.getName() + "/" + mid);
} else {
pagesUserThread.doGetThread(sql, request, response, mid);
}
@@ -314,8 +314,8 @@ public class Main extends HttpServlet implements Stream.StreamListener {
Errors.doGet404(sql, request, response);
}
}
- } else if (user != null && !user.Banned) {
- Utils.sendPermanentRedirect(response, "/" + user.getUName() + "/" + (uriparts.length > 2 ? uriparts[2] : ""));
+ } else if (user != null && !user.isBanned()) {
+ Utils.sendPermanentRedirect(response, "/" + user.getName() + "/" + (uriparts.length > 2 ? uriparts[2] : ""));
} else {
Errors.doGet404(sql, request, response);
}
@@ -341,7 +341,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
switch (uri) {
case "/post": {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor.getUID() > 0 && !visitor.Banned) {
+ if (visitor.getUid() > 0 && !visitor.isBanned()) {
pagesNewMessage.doPostMessage(sql, request, response, xmpp, visitor);
} else {
response.sendError(403);
@@ -350,7 +350,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
}
case "/comment": {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor.getUID() > 0 && !visitor.Banned) {
+ if (visitor.getUid() > 0 && !visitor.isBanned()) {
pagesNewMessage.doPostComment(sql, request, response, xmpp, visitor);
} else {
response.sendError(403);
@@ -359,7 +359,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
}
case "/like": {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor.getUID() > 0 && !visitor.Banned) {
+ if (visitor.getUid() > 0 && !visitor.isBanned()) {
pagesNewMessage.doPostRecomm(sql, request, response, xmpp, visitor);
} else {
response.sendError(403);
@@ -368,7 +368,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
}
case "/pm/send": {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
- if (visitor.getUID() > 0 && !visitor.Banned) {
+ if (visitor.getUid() > 0 && !visitor.isBanned()) {
pm.doPostPM(sql, request, response, xmpp, visitor);
} else {
response.sendError(403);