X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FDistrustPage.java;h=c055545633f90d62269f4e2cef3316cc3e9a0bef;hb=ee05a67b3f1e796b6c4bdcd709ef0983103c455f;hp=021fa6bf27caf11dbe73c4ae72f66e3f2ac14efc;hpb=3ff1cdf09693a28719246a9a98a8b908e8c848f7;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/DistrustPage.java b/src/main/java/net/pterodactylus/sone/web/DistrustPage.java index 021fa6b..c055545 100644 --- a/src/main/java/net/pterodactylus/sone/web/DistrustPage.java +++ b/src/main/java/net/pterodactylus/sone/web/DistrustPage.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 distrust another Sone. This will assign a @@ -51,17 +52,17 @@ public class DistrustPage 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().distrustSone(currentSone, sone); } - throw new RedirectException(returnPath); + throw new RedirectException(returnPage); } }