Author: saces
Date: 2008-09-01 21:55:17 +0000 (Mon, 01 Sep 2008)
New Revision: 22323
Modified:
trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
Log:
provide a "open with KeyExplorer" link on NotInArchive errors
Modified: trunk/freenet/src/freenet/clients/http/FProxyToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/FProxyToadlet.java 2008-09-01
21:16:30 UTC (rev 22322)
+++ trunk/freenet/src/freenet/clients/http/FProxyToadlet.java 2008-09-01
21:55:17 UTC (rev 22323)
@@ -234,7 +234,6 @@
L10n.addL10nSubstitution(option,
"FProxyToadlet.openForceDisk", new String[] { "link", "/link" }, new String[] {
"<a href=\""+basePath+key.toString()+"?forcedownload"+extras+"\">", "</a>" });
if(!(mimeType.equals("application/octet-stream") ||
mimeType.equals("application/x-msdownload"))) {
option = optionList.addChild("li");
-
L10n.addL10nSubstitution(option,
"FProxyToadlet.openForce", new String[] { "link", "/link", "mime" }, new
String[] { "<a href=\""+basePath + key.toString() + "?force=" +
getForceValue(key, now)+extras+"\">", "</a>", HTMLEncoder.encode(mimeType)});
}
if(referrer != null) {
@@ -516,6 +515,12 @@
infoboxContent = infobox.addChild("div",
"class", "infobox-content");
HTMLNode optionList =
infoboxContent.addChild("ul");
+
+ if((e.mode == FetchException.NOT_IN_ARCHIVE) &&
(core.node.pluginManager.isPluginLoaded("plugins.KeyExplorer.KeyExplorer"))) {
+ option = optionList.addChild("li");
+ L10n.addL10nSubstitution(option,
"FProxyToadlet.openWithKeyExplorer", new String[] { "link", "/link" }, new
String[] { "<a href=\"/plugins/plugins.KeyExplorer.KeyExplorer/?key=" +
key.toString() + "\">", "</a>" });
+ }
+
if(!e.isFatal() && ctx.isAllowedFullAccess()) {
option = optionList.addChild("li");
HTMLNode optionForm =
ctx.addFormChild(option, "/queue/", "dnfQueueForm");
Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties 2008-09-01
21:16:30 UTC (rev 22322)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties 2008-09-01
21:55:17 UTC (rev 22323)
@@ -341,6 +341,7 @@
FProxyToadlet.openRSSForce=${link}Click here${/link} to open the file as
${mime} (this ${bold}may be dangerous${/bold} on IE7 or FF2).
FProxyToadlet.opennet=manage untrusted connections
FProxyToadlet.opennetTitle=Strangers
+FProxyToadlet.openWithKeyExplorer=${link}Click here${/link} to open the
freenet uri with key explorer.
FProxyToadlet.options=Your options are:
FProxyToadlet.pathNotFound=The specified path does not exist.
FProxyToadlet.pathNotFoundTitle=Path Not Found