aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Blogs.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/juick/http/www/Blogs.java')
-rw-r--r--src/java/com/juick/http/www/Blogs.java36
1 files changed, 28 insertions, 8 deletions
diff --git a/src/java/com/juick/http/www/Blogs.java b/src/java/com/juick/http/www/Blogs.java
index 1e212b7a..a1cfdeb0 100644
--- a/src/java/com/juick/http/www/Blogs.java
+++ b/src/java/com/juick/http/www/Blogs.java
@@ -83,17 +83,37 @@ public class Blogs {
mids = MessagesQueries.getAll(sql, paramBefore);
}
} else if (paramShow.equals("my")) {
- title = rb.getString("My feed");
- mids = MessagesQueries.getMyFeed(sql, visitor.UID, paramBefore);
+ if (visitor != null) {
+ title = rb.getString("My feed");
+ mids = MessagesQueries.getMyFeed(sql, visitor.UID, paramBefore);
+ } else {
+ response.sendError(404);
+ return;
+ }
} else if (paramShow.equals("private")) {
- title = rb.getString("Private");
- mids = MessagesQueries.getPrivate(sql, visitor.UID, paramBefore);
+ if (visitor != null) {
+ title = rb.getString("Private");
+ mids = MessagesQueries.getPrivate(sql, visitor.UID, paramBefore);
+ } else {
+ response.sendError(404);
+ return;
+ }
} else if (paramShow.equals("incoming")) {
- title = rb.getString("Incoming");
- mids = MessagesQueries.getIncoming(sql, visitor.UID, paramBefore);
+ if (visitor != null) {
+ title = rb.getString("Incoming");
+ mids = MessagesQueries.getIncoming(sql, visitor.UID, paramBefore);
+ } else {
+ response.sendError(404);
+ return;
+ }
} else if (paramShow.equals("recommended")) {
- title = rb.getString("Recommended");
- mids = MessagesQueries.getRecommended(sql, visitor.UID, paramBefore);
+ if (visitor != null) {
+ title = rb.getString("Recommended");
+ mids = MessagesQueries.getRecommended(sql, visitor.UID, paramBefore);
+ } else {
+ response.sendError(404);
+ return;
+ }
} else if (paramShow.equals("top")) {
title = rb.getString("Popular");
mids = MessagesQueries.getPopular(sql, paramBefore);