diff options
Diffstat (limited to 'src/java/com/juick/http/www/Blogs.java')
-rw-r--r-- | src/java/com/juick/http/www/Blogs.java | 11 |
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(); } |