From: David ‘Bombe’ Roden Date: Mon, 17 Jan 2011 10:03:32 +0000 (+0100) Subject: Use “returnPage” instead of “returnPath” everywhere. Fixes #60. X-Git-Tag: 0.4.2^2~27^2~10 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5c2890b61074d8f0420b70c515583556d90f7d7c;p=Sone.git Use “returnPage” instead of “returnPath” everywhere. Fixes #60. --- diff --git a/src/main/java/net/pterodactylus/sone/web/DistrustPage.java b/src/main/java/net/pterodactylus/sone/web/DistrustPage.java index 9cbbb55..4b14df0 100644 --- a/src/main/java/net/pterodactylus/sone/web/DistrustPage.java +++ b/src/main/java/net/pterodactylus/sone/web/DistrustPage.java @@ -55,14 +55,14 @@ public class DistrustPage extends SoneTemplatePage { protected void processTemplate(Request request, DataProvider dataProvider) throws RedirectException { super.processTemplate(request, dataProvider); if (request.getMethod() == Method.POST) { - String returnPath = request.getHttpRequest().getPartAsStringFailsafe("returnPath", 256); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); String identity = request.getHttpRequest().getPartAsStringFailsafe("sone", 44); Sone currentSone = getCurrentSone(request.getToadletContext()); Sone sone = webInterface.getCore().getSone(identity, false); if (sone != null) { webInterface.getCore().distrustSone(currentSone, sone); } - throw new RedirectException(returnPath); + throw new RedirectException(returnPage); } } diff --git a/src/main/java/net/pterodactylus/sone/web/TrustPage.java b/src/main/java/net/pterodactylus/sone/web/TrustPage.java index 85341ad..b74a2b6 100644 --- a/src/main/java/net/pterodactylus/sone/web/TrustPage.java +++ b/src/main/java/net/pterodactylus/sone/web/TrustPage.java @@ -55,14 +55,14 @@ public class TrustPage extends SoneTemplatePage { protected void processTemplate(Request request, DataProvider dataProvider) throws RedirectException { super.processTemplate(request, dataProvider); if (request.getMethod() == Method.POST) { - String returnPath = request.getHttpRequest().getPartAsStringFailsafe("returnPath", 256); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); String identity = request.getHttpRequest().getPartAsStringFailsafe("sone", 44); Sone currentSone = getCurrentSone(request.getToadletContext()); Sone sone = webInterface.getCore().getSone(identity, false); if (sone != null) { webInterface.getCore().trustSone(currentSone, sone); } - throw new RedirectException(returnPath); + throw new RedirectException(returnPage); } } diff --git a/src/main/java/net/pterodactylus/sone/web/UntrustPage.java b/src/main/java/net/pterodactylus/sone/web/UntrustPage.java index cc9e26d..9d071b8 100644 --- a/src/main/java/net/pterodactylus/sone/web/UntrustPage.java +++ b/src/main/java/net/pterodactylus/sone/web/UntrustPage.java @@ -55,14 +55,14 @@ public class UntrustPage extends SoneTemplatePage { protected void processTemplate(Request request, DataProvider dataProvider) throws RedirectException { super.processTemplate(request, dataProvider); if (request.getMethod() == Method.POST) { - String returnPath = request.getHttpRequest().getPartAsStringFailsafe("returnPath", 256); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); String identity = request.getHttpRequest().getPartAsStringFailsafe("sone", 44); Sone currentSone = getCurrentSone(request.getToadletContext()); Sone sone = webInterface.getCore().getSone(identity, false); if (sone != null) { webInterface.getCore().untrustSone(currentSone, sone); } - throw new RedirectException(returnPath); + throw new RedirectException(returnPage); } }