From 993fa5c2104f378bb28d6b6d586657766c3d71be Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 11 Dec 2009 19:03:30 +0000 Subject: [PATCH] fix all summary bar relative links --- .../i2p/router/web/SummaryBarRenderer.java | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java index bbffa6c9d..8643a9c0c 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java @@ -19,10 +19,14 @@ public class SummaryBarRenderer { _helper = helper; } + /** + * Note - ensure all links in here are absolute, as the summary bar may be displayed + * on lower-level directory errors. + */ public void renderSummaryHTML(Writer out) throws IOException { StringBuilder buf = new StringBuilder(8*1024); - buf.append("\"")\"")" + - "
") .append(_("Addressbook")) .append("\n" + - "") .append(_("Torrents")) .append("\n" + - "") .append(_("Webmail")) @@ -68,7 +72,7 @@ public class SummaryBarRenderer { .append(_("Webserver")) .append("
\n" + - "

") .append(_("I2P Internals")) @@ -76,49 +80,49 @@ public class SummaryBarRenderer { "
\n" + - "") .append(_("Tunnels")) .append("\n" + - "") .append(_("Peers")) .append("\n" + - "") .append(_("Profiles")) .append("\n" + - "") .append(_("NetDB")) .append("\n" + - "") .append(_("Logs")) .append("\n" + - "") .append(_("Jobs")) .append("\n" + - "") .append(_("Graphs")) .append("\n" + - "") .append(_("Stats")) @@ -130,7 +134,7 @@ public class SummaryBarRenderer { - buf.append("

") .append(_("General")) @@ -141,7 +145,7 @@ public class SummaryBarRenderer { .append(_helper.getIdent()) .append(", ") .append(_("never reveal it to anyone")) - .append("\" href=\"netdb.jsp?r=.\" target=\"_top\">") + .append("\" href=\"/netdb.jsp?r=.\" target=\"_top\">") .append(_("Local Identity")) .append("


\n" + @@ -163,7 +167,7 @@ public class SummaryBarRenderer { .append(_helper.getUptime()) .append("

\n" + - "

") .append(_helper.getReachability()) @@ -217,7 +221,7 @@ public class SummaryBarRenderer { buf.append("

") .append(ConfigRestartBean.renderStatus(_helper.getRequestURI(), _helper.getAction(), _helper.getConsoleNonce())) - .append("



") .append(_("Peers")) @@ -266,7 +270,7 @@ public class SummaryBarRenderer { boolean anotherLine = false; if (_helper.showFirewallWarning()) { - buf.append("

") .append(_("Check NAT/firewall")) @@ -305,7 +309,7 @@ public class SummaryBarRenderer { buf.append("
"); - buf.append("

") .append(_("Bandwidth in/out")) @@ -340,7 +344,7 @@ public class SummaryBarRenderer { .append(_helper.getOutboundTransferred()) .append("\n" + - "

") .append(_("Tunnels in/out"))