aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Blogs.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-02-20 21:38:29 +0700
committerGravatar Ugnich Anton2012-02-20 21:38:29 +0700
commit34da94d887ae7be134d17c4bc9e101a8c198b300 (patch)
tree2e3d3444fdb4c4508072a39b9962965556111fe2 /src/java/com/juick/http/www/Blogs.java
parent2acfbc4184eec216c2a394029962aa2905c6b0a2 (diff)
Bugfixes
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);