Author: nextgens
Date: 2007-04-25 09:19:13 +0000 (Wed, 25 Apr 2007)
New Revision: 12933
Modified:
trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
Log:
Remove the possibility of downloading the full translation file (it wasn't
including the override, and is probably useless anyway)
Modified: trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
2007-04-24 23:09:54 UTC (rev 12932)
+++ trunk/freenet/src/freenet/clients/http/StatisticsToadlet.java
2007-04-25 09:19:13 UTC (rev 12933)
@@ -177,7 +177,6 @@
if(nodeConfig.config.get("logger").getBoolean("enabled"))
logsList.addChild("li").addChild("a", new String[]{
"href", "target"}, new String[]{ "/?latestlog", "_new"}, "Get latest node's
logfile");
logsList.addChild("li").addChild("a", "href",
TranslationToadlet.TOADLET_URL+"?getOverrideTranlationFile").addChild("#",
"Download the override translation file");
- logsList.addChild("li").addChild("a", "href",
TranslationToadlet.TOADLET_URL+"?getTranlationFile").addChild("#", "Download
the full translation file");
if(advancedModeEnabled) {
// store size box
Modified: trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
2007-04-24 23:09:54 UTC (rev 12932)
+++ trunk/freenet/src/freenet/clients/http/TranslationToadlet.java
2007-04-25 09:19:13 UTC (rev 12933)
@@ -38,14 +38,7 @@
return;
}
- if (request.isParameterSet("getTranlationFile")) {
- byte[] data =
L10n.getCurrentLanguageTranslation().toOrderedString().getBytes("UTF-8");
- MultiValueTable head = new MultiValueTable();
- head.put("Content-Disposition", "attachment;
filename=\"" + L10n.PREFIX +L10n.getSelectedLanguage()+ L10n.SUFFIX + '"');
- ctx.sendReplyHeaders(200, "Found", head, "text/plain",
data.length);
- ctx.writeData(data);
- return;
- } else if (request.isParameterSet("getOverrideTranlationFile"))
{
+ if (request.isParameterSet("getOverrideTranlationFile")) {
SimpleFieldSet sfs =
L10n.getOverrideForCurrentLanguageTranslation();
if(sfs == null) {
super.sendErrorPage(ctx, 503 /* Service
Unavailable */, "Service Unavailable", "There is no custom translation
available.");
@@ -84,8 +77,6 @@
HTMLNode footer = translationNode.addChild("div",
"class", "warning");
footer.addChild("a", "href",
TOADLET_URL+"?getOverrideTranlationFile").addChild("#", "Download the override
translation file");
footer.addChild("%", " ");
- footer.addChild("a", "href",
TOADLET_URL+"?getTranlationFile").addChild("#", "Download the full translation
file");
- footer.addChild("%", " ");
footer.addChild("a", "href", TOADLET_URL).addChild("#",
"Return to the translation page");
this.writeReply(ctx, 200, "text/html; charset=utf-8",
"OK", pageNode.generate());