aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-10-24 22:06:41 +0300
committerGravatar Vitaly Takmazov2015-10-24 22:06:41 +0300
commitd0920d0d1b1abb3f6c8374734c6420fbdcb0be78 (patch)
treebd316fe28ef1ad34cb948982b586d4b4b89f3cc2
parenta30c2966576e3d18b3dbdde3a610dd97fe038f7e (diff)
photos for visitors
-rw-r--r--src/main/java/com/juick/http/www/Home.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/juick/http/www/Home.java b/src/main/java/com/juick/http/www/Home.java
index 27a63574..20752a40 100644
--- a/src/main/java/com/juick/http/www/Home.java
+++ b/src/main/java/com/juick/http/www/Home.java
@@ -78,9 +78,13 @@ public class Home {
} else if (paramShow.equals("recommended") && visitor != null) {
title = "Рекомендации";
mids = MessagesQueries.getRecommended(sql, visitor.UID, paramBefore);
- } else if (paramShow.equals("photos") && visitor != null) {
+ } else if (paramShow.equals("photos")) {
title = "Фотографии";
- mids = MessagesQueries.getPhotos(sql, visitor.UID, paramBefore);
+ if (visitor != null) {
+ mids = MessagesQueries.getPhotos(sql, visitor.UID, paramBefore);
+ } else {
+ mids = MessagesQueries.getPhotos(sql, 0, paramBefore);
+ }
} else if (paramShow.equals("all")) {
title = "Все сообщения";
if (visitor != null) {