aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/juick')
-rw-r--r--src/java/com/juick/http/www/Discover.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/java/com/juick/http/www/Discover.java b/src/java/com/juick/http/www/Discover.java
index b76a1d77..a9ae360a 100644
--- a/src/java/com/juick/http/www/Discover.java
+++ b/src/java/com/juick/http/www/Discover.java
@@ -83,7 +83,7 @@ public class Discover {
if (paramShow == null) {
if (paramTag > 0) {
title = "*" + Utils.encodeHTML(paramTagStr);
- mids = MessagesQueries.getTag(sql, paramTag, visitor_uid, paramBefore);
+ mids = MessagesQueries.getTag(sql, paramTag, visitor_uid, paramBefore, (visitor == null) ? 40 : 20);
} else if (paramSearch != null) {
title = rb.getString("Search") + ": " + Utils.encodeHTML(paramSearch);
mids = MessagesQueries.getSearch(sql, sqlSearch, Utils.encodeSphinx(paramSearch), paramBefore);
@@ -115,15 +115,19 @@ public class Discover {
out.println("</ul>");
}
- if (mids.size() == 20) {
- String nextpage = "?before=" + mids.get(mids.size() - 1);
- if (paramShow != null) {
- nextpage += "&amp;show=" + paramShow;
+ if (visitor != null) {
+ if (mids.size() == 20) {
+ String nextpage = "?before=" + mids.get(mids.size() - 1);
+ if (paramShow != null) {
+ nextpage += "&amp;show=" + paramShow;
+ }
+ if (paramSearch != null) {
+ nextpage += "&amp;search=" + URLEncoder.encode(paramSearch, "UTF-8");
+ }
+ out.println("<p class=\"page\"><a href=\"" + nextpage + "\">Older →</a></p>");
}
- if (paramSearch != null) {
- nextpage += "&amp;search=" + URLEncoder.encode(paramSearch, "UTF-8");
- }
- out.println("<p class=\"page\"><a href=\"" + nextpage + "\">Older →</a></p>");
+ } else {
+ out.println("<p class=\"page\"><a href=\"/\">" + rb.getString("LoginToReadMore") + "</a></p>");
}
PageTemplates.pageFooter(request, out, locale, visitor, true);
out.println("</div>");
@@ -136,7 +140,7 @@ public class Discover {
out.println(" <li><a href=\"/discover?show=photos\">" + rb.getString("With photos") + "</a></li>");
out.println(" </ul>");
out.println(" <hr/>");
- out.println(" <p>" + getTags(sql, 45) + "</p>");
+ out.println(" <p>" + getTags(sql, 60) + "</p>");
out.println("</div>");
out.println("</div>"); // topwrapper