aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Blogs.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2013-01-03 17:24:54 +0700
committerGravatar Ugnich Anton2013-01-03 17:24:54 +0700
commit881bc336c1cef93d08cd1f14e37f3a3feeb07e58 (patch)
treefcd3ea5ff881a1f59e4d42fd57dee7003b5bcdc1 /src/java/com/juick/http/www/Blogs.java
parent84e5ac3a172e15f11b04203cf9e93c9d5c8174ed (diff)
many bugfixes
message number js autoselection privacy fix
Diffstat (limited to 'src/java/com/juick/http/www/Blogs.java')
-rw-r--r--src/java/com/juick/http/www/Blogs.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/java/com/juick/http/www/Blogs.java b/src/java/com/juick/http/www/Blogs.java
index 44c734d2..4af75cd3 100644
--- a/src/java/com/juick/http/www/Blogs.java
+++ b/src/java/com/juick/http/www/Blogs.java
@@ -92,11 +92,12 @@ public class Blogs {
}
com.juick.Place place = null;
+ int visitor_uid = visitor != null ? visitor.UID : 0;
if (paramShow == null) {
if (paramTag > 0) {
title = "*" + Utils.encodeHTML(paramTagStr);
- mids = MessagesQueries.getTag(sql, paramTag, paramBefore);
+ mids = MessagesQueries.getTag(sql, paramTag, visitor_uid, paramBefore);
} else if (paramSearch != null) {
title = rb.getString("Search") + ": " + Utils.encodeHTML(paramSearch);
mids = MessagesQueries.getSearch(sql, sqlSearch, Utils.encodeSphinx(paramSearch), paramBefore);
@@ -109,14 +110,14 @@ public class Blogs {
place = com.juick.server.PlacesQueries.getPlace(sql, place_id);
if (place != null) {
title = place.name;
- mids = MessagesQueries.getPlace(sql, place_id, paramBefore);
+ mids = MessagesQueries.getPlace(sql, place_id, visitor_uid, paramBefore);
} else {
response.sendError(404);
return;
}
} else {
title = rb.getString("Last messages");
- mids = MessagesQueries.getAll(sql, paramBefore);
+ mids = MessagesQueries.getAll(sql, visitor_uid, paramBefore);
}
} else if (paramShow.equals("my")) {
if (visitor != null) {
@@ -155,7 +156,7 @@ public class Blogs {
mids = MessagesQueries.getPopular(sql, paramBefore);
} else if (paramShow.equals("photos")) {
title = rb.getString("With photos");
- mids = MessagesQueries.getPhotos(sql, paramBefore);
+ mids = MessagesQueries.getPhotos(sql, visitor_uid, paramBefore);
} else {
response.sendError(404);
return;
@@ -222,7 +223,7 @@ public class Blogs {
out.println("</div>"); // topwrapper
PageTemplates.pageDialogTemplate(out, locale);
- PageTemplates.pageFooter(request, out, locale, visitor);
+ PageTemplates.pageFooter(request, out, locale, visitor, true);
} finally {
out.close();
}