forked from I2P_Developers/i2p.i2p
minor cleanups
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
package net.i2p.router.web.helpers;
|
||||
|
||||
import net.i2p.data.Base32;
|
||||
import net.i2p.data.DataFormatException;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.data.SessionKey;
|
||||
@ -40,8 +39,7 @@ public class ConfigKeyringHandler extends FormHandler {
|
||||
addFormError(_t("Invalid key"));
|
||||
} else {
|
||||
_context.keyRing().put(h, sk);
|
||||
addFormNotice(_t("Key for {0} added to keyring",
|
||||
Base32.encode(h.getData()) + ".b32.i2p"));
|
||||
addFormNotice(_t("Key for {0} added to keyring", h.toBase32()));
|
||||
}
|
||||
} else { // Delete
|
||||
if (h != null && h.getData() != null) {
|
||||
@ -49,11 +47,9 @@ public class ConfigKeyringHandler extends FormHandler {
|
||||
// don't bother translating
|
||||
addFormError("Cannot remove key for local destination. Disable encryption in the Hidden Services Manager.");
|
||||
} else if (_context.keyRing().remove(h) != null) {
|
||||
addFormNotice(_t("Key for {0} removed from keyring",
|
||||
Base32.encode(h.getData()) + ".b32.i2p"));
|
||||
addFormNotice(_t("Key for {0} removed from keyring", h.toBase32()));
|
||||
} else {
|
||||
addFormNotice(_t("Key for {0} not found in keyring",
|
||||
Base32.encode(h.getData()) + ".b32.i2p"));
|
||||
addFormNotice(_t("Key for {0} not found in keyring", h.toBase32()));
|
||||
}
|
||||
} else {
|
||||
addFormError(_t("Invalid destination"));
|
||||
|
@ -4,7 +4,6 @@ import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.util.Map;
|
||||
|
||||
import net.i2p.data.Base32;
|
||||
import net.i2p.data.Destination;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.data.SessionKey;
|
||||
@ -51,7 +50,7 @@ public class ConfigKeyringHelper extends HelperBase {
|
||||
if (local != _context.clientManager().isLocal(h))
|
||||
continue;
|
||||
buf.append("\n<tr><td>");
|
||||
buf.append(Base32.encode(h.getData())).append(".b32.i2p");
|
||||
buf.append(h.toBase32());
|
||||
buf.append("</td><td>");
|
||||
Destination dest = _context.netDb().lookupDestinationLocally(h);
|
||||
if (dest != null && local) {
|
||||
|
@ -14,7 +14,7 @@ Helpers usually extend HelperBase, and Handlers usually extend FormHandler.
|
||||
</p><p>
|
||||
This package was created in release 0.9.33 by moving
|
||||
these classes from net.i2p.router.web to here,
|
||||
and moving them from routerconsole.war to routerconsole.jar.
|
||||
and moving them from routerconsole.jar to routerconsole.war.
|
||||
</p><p>
|
||||
No classes contained here are part of a public API.
|
||||
Subject to change.
|
||||
|
@ -16,7 +16,7 @@ The base classes are in this package, but most Helpers, Handlers, and Renderers
|
||||
</p><p>
|
||||
This package was split in release 0.9.33, with most of the helpers and handlers
|
||||
moved to net.i2p.router.web.console,
|
||||
and moving them from routerconsole.war to routerconsole.jar.
|
||||
and moving them from routerconsole.jar to routerconsole.war.
|
||||
</p><p>
|
||||
No classes contained here are part of a public API.
|
||||
Subject to change.
|
||||
|
Reference in New Issue
Block a user