forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p.zzz.dir' (head a871493662f67163f823576ba26e98322d3f896f)
to branch 'i2p.i2p.zzz.test' (head 1168ac4132d737382bf24ba8458a53a9db002ffa)
This commit is contained in:
@@ -15,8 +15,11 @@ if (c != null && c.length() > 0) {
|
||||
java.io.OutputStream cout = response.getOutputStream();
|
||||
response.setContentType("image/png");
|
||||
response.setHeader("Cache-Control", "max-age=86400"); // cache for a day
|
||||
String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath();
|
||||
String file = "docs" + java.io.File.separatorChar + "icons" + java.io.File.separatorChar +
|
||||
"flags" + java.io.File.separatorChar + c + ".png";
|
||||
try {
|
||||
net.i2p.util.FileUtil.readFile(c + ".png", "docs/icons/flags", cout);
|
||||
net.i2p.util.FileUtil.readFile(file, base, cout);
|
||||
rendered = true;
|
||||
} catch (java.io.IOException ioe) {}
|
||||
if (rendered)
|
||||
|
@@ -184,7 +184,8 @@ client applications can be found on our <a href="http://www.i2p2.i2p/download">d
|
||||
|
||||
<h2>Release history</h2>
|
||||
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="contenthelper" scope="request" />
|
||||
<jsp:setProperty name="contenthelper" property="page" value="history.txt" />
|
||||
<% File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "history.txt"); %>
|
||||
<jsp:setProperty name="contenthelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="contenthelper" property="maxLines" value="500" />
|
||||
<jsp:setProperty name="contenthelper" property="startAtBeginning" value="true" />
|
||||
<jsp:getProperty name="contenthelper" property="textContent" />
|
||||
|
@@ -19,7 +19,8 @@ if (System.getProperty("router.consoleNonce") == null) {
|
||||
|
||||
<div class="news" id="news">
|
||||
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="newshelper" scope="request" />
|
||||
<jsp:setProperty name="newshelper" property="page" value="docs/news.xml" />
|
||||
<% File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/news.xml"); %>
|
||||
<jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
||||
<jsp:getProperty name="newshelper" property="content" />
|
||||
|
||||
@@ -30,7 +31,8 @@ if (System.getProperty("router.consoleNonce") == null) {
|
||||
|
||||
<div class="main" id="main">
|
||||
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="contenthelper" scope="request" />
|
||||
<jsp:setProperty name="contenthelper" property="page" value="docs/readme.html" />
|
||||
<% fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/readme.html"); %>
|
||||
<jsp:setProperty name="contenthelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="contenthelper" property="maxLines" value="300" />
|
||||
<jsp:setProperty name="contenthelper" property="lang" value="<%=request.getParameter("lang")%>" />
|
||||
<jsp:getProperty name="contenthelper" property="content" />
|
||||
|
@@ -3,9 +3,10 @@
|
||||
<a href="index.jsp"><img src="i2plogo.png" alt="Router Console" width="187" height="35" /></a><br />
|
||||
</div>
|
||||
<div class="toolbar">
|
||||
<% if (new File("docs/toolbar.html").exists()) { %>
|
||||
<% File path = new File(net.i2p.I2PAppContext.getGlobalContext().getBaseDir(), "docs/toolbar.html");
|
||||
if (path.exists()) { %>
|
||||
<jsp:useBean class="net.i2p.router.web.ContentHelper" id="toolbarhelper" scope="request" />
|
||||
<jsp:setProperty name="toolbarhelper" property="page" value="docs/toolbar.html" />
|
||||
<jsp:setProperty name="toolbarhelper" property="page" value="<%=path.getAbsolutePath()%>" />
|
||||
<jsp:setProperty name="toolbarhelper" property="maxLines" value="300" />
|
||||
<jsp:getProperty name="toolbarhelper" property="content" />
|
||||
<% } else { %>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<%
|
||||
<%
|
||||
/*
|
||||
* USE CAUTION WHEN EDITING
|
||||
* Trailing whitespace OR NEWLINE on the last line will cause
|
||||
@@ -16,5 +16,7 @@ if (uri.endsWith(".css")) {
|
||||
response.setContentType("image/jpeg");
|
||||
}
|
||||
|
||||
net.i2p.util.FileUtil.readFile(uri, "./docs", response.getOutputStream());
|
||||
String base = net.i2p.I2PAppContext.getGlobalContext().getBaseDir().getAbsolutePath() +
|
||||
java.io.File.separatorChar + "docs";
|
||||
net.i2p.util.FileUtil.readFile(uri, base, response.getOutputStream());
|
||||
%>
|
Reference in New Issue
Block a user