X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FTrustPage.java;h=b0dadef103ec0d216b527093c9c7d01446d4b7e6;hb=07ca98b45465f7a442e695fbfb6f59100260f39b;hp=ef64d627549e96092ac4d4373ca8e4369510cebd;hpb=46006ac564cc3efb833fb31ccf5a01cf113927f8;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/TrustPage.java b/src/main/java/net/pterodactylus/sone/web/TrustPage.java index ef64d62..b0dadef 100644 --- a/src/main/java/net/pterodactylus/sone/web/TrustPage.java +++ b/src/main/java/net/pterodactylus/sone/web/TrustPage.java @@ -21,6 +21,7 @@ import net.pterodactylus.sone.core.Core; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.sone.web.page.Page.Request.Method; import net.pterodactylus.util.template.Template; +import net.pterodactylus.util.template.TemplateContext; /** * Page that lets the user trust another Sone. This will assign a configurable @@ -51,17 +52,17 @@ public class TrustPage extends SoneTemplatePage { * {@inheritDoc} */ @Override - protected void processTemplate(Request request, Template template) throws RedirectException { - super.processTemplate(request, template); + protected void processTemplate(Request request, TemplateContext templateContext) throws RedirectException { + super.processTemplate(request, templateContext); 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); } }