aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/java/Global.properties1
-rw-r--r--src/java/Global_ru.properties1
-rw-r--r--src/java/com/juick/http/www/Discover.java24
3 files changed, 16 insertions, 10 deletions
diff --git a/src/java/Global.properties b/src/java/Global.properties
index f823d7d2..afb765df 100644
--- a/src/java/Global.properties
+++ b/src/java/Global.properties
@@ -29,3 +29,4 @@ in\ reply\ to=in reply to
(Dialog)\ Link\ to\ message=Permanent link to this message
(Dialog)\ Message\ number=Message number
(Dialog)\ Share=Share in social networks
+LoginToReadMore=Sign in to read more
diff --git a/src/java/Global_ru.properties b/src/java/Global_ru.properties
index 2df1f883..84b12e5c 100644
--- a/src/java/Global_ru.properties
+++ b/src/java/Global_ru.properties
@@ -29,3 +29,4 @@ in\ reply\ to=\u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430
(Dialog)\ Link\ to\ message=\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435
(Dialog)\ Message\ number=\u041d\u043e\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f
(Dialog)\ Share=\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445
+LoginToReadMore=\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0443\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435
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