aboutsummaryrefslogtreecommitdiff
path: root/src/java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-01-27 06:04:15 +0700
committerGravatar Ugnich Anton2014-01-27 06:04:15 +0700
commitade66d36ff43112c06b13e484d029724354f7ae4 (patch)
treec1bb8d8bcdb3b2c24fe2f82462075a4005516fdf /src/java
parent3b388f8b3add54e794bd37172a6973e69a55778d (diff)
pageHomeColumn anonymous fix
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/juick/http/www/Discover.java2
-rw-r--r--src/java/com/juick/http/www/Home.java2
-rw-r--r--src/java/com/juick/http/www/PM.java4
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java12
4 files changed, 11 insertions, 9 deletions
diff --git a/src/java/com/juick/http/www/Discover.java b/src/java/com/juick/http/www/Discover.java
index 5e24889b..98f46656 100644
--- a/src/java/com/juick/http/www/Discover.java
+++ b/src/java/com/juick/http/www/Discover.java
@@ -92,7 +92,7 @@ public class Discover {
out.println("</div>");
out.println("</div>"); // wrapper
- PageTemplates.pageHomeColumn(out, sql, locale);
+ PageTemplates.pageHomeColumn(out, sql, visitor, locale);
out.println("</div>"); // topwrapper
diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java
index 8bf30af5..6833aebb 100644
--- a/src/java/com/juick/http/www/Home.java
+++ b/src/java/com/juick/http/www/Home.java
@@ -139,7 +139,7 @@ public class Home {
out.println("</div>");
out.println("</div>"); // wrapper
- PageTemplates.pageHomeColumn(out, sql, locale);
+ PageTemplates.pageHomeColumn(out, sql, visitor, locale);
out.println("</div>"); // topwrapper
diff --git a/src/java/com/juick/http/www/PM.java b/src/java/com/juick/http/www/PM.java
index b874c065..5c0f67f9 100644
--- a/src/java/com/juick/http/www/PM.java
+++ b/src/java/com/juick/http/www/PM.java
@@ -103,7 +103,7 @@ public class PM {
out.println("</div>");
out.println("</div>"); // wrapper
- PageTemplates.pageHomeColumn(out, sql, locale);
+ PageTemplates.pageHomeColumn(out, sql, visitor, locale);
out.println("</div>"); // topwrapper
@@ -186,7 +186,7 @@ public class PM {
out.println("</div>");
out.println("</div>"); // wrapper
- PageTemplates.pageHomeColumn(out, sql, locale);
+ PageTemplates.pageHomeColumn(out, sql, visitor, locale);
out.println("</div>"); // topwrapper
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index f1a1b29d..73910321 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -170,7 +170,7 @@ public class PageTemplates {
out.println("</script>");
}
- public static void pageHomeColumn(PrintWriter out, Connection sql, Locale locale) {
+ public static void pageHomeColumn(PrintWriter out, Connection sql, com.juick.User visitor, Locale locale) {
ResourceBundle rb = ResourceBundle.getBundle("Blogs", locale);
if (tagsHTML == null) {
@@ -179,10 +179,12 @@ public class PageTemplates {
out.println("<div id=\"column\" class=\"abs\">");
out.println(" <ul>");
- out.println(" <li><a href=\"/\">" + rb.getString("My feed") + "</a></li>");
- out.println(" <li><a href=\"/pm/inbox\">" + rb.getString("Private") + "</a> · <a href=\"/pm/sent\">" + rb.getString("Private sent") + "</a></li>");
- out.println(" <li><a href=\"/?show=discuss\">" + rb.getString("Discussions") + "</a></li>");
- out.println(" <li><a href=\"/?show=recommended\">" + rb.getString("Recommended") + "</a></li>");
+ if (visitor != null) {
+ out.println(" <li><a href=\"/\">" + rb.getString("My feed") + "</a></li>");
+ out.println(" <li><a href=\"/pm/inbox\">" + rb.getString("Private") + "</a> · <a href=\"/pm/sent\">" + rb.getString("Private sent") + "</a></li>");
+ out.println(" <li><a href=\"/?show=discuss\">" + rb.getString("Discussions") + "</a></li>");
+ out.println(" <li><a href=\"/?show=recommended\">" + rb.getString("Recommended") + "</a></li>");
+ }
out.println(" <li class=\"margtop\"><a href=\"/?show=top\">" + rb.getString("Popular") + "</a></li>");
out.println(" <li><a href=\"/?show=all\">" + rb.getString("All messages") + "</a></li>");
out.println(" </ul>");