X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FDeletePostPage.java;h=761be50b009728f01d3355c49cc82c38b6304d12;hb=bd2cbb229f68fb2535cf6010befa9c4a276d2ee6;hp=18262a21eb160f90c8712cabbbcd8c48dd4f70e0;hpb=a2715f410c410e95397ebbfabbe51a5abfd50387;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/DeletePostPage.java b/src/main/java/net/pterodactylus/sone/web/DeletePostPage.java index 18262a2..761be50 100644 --- a/src/main/java/net/pterodactylus/sone/web/DeletePostPage.java +++ b/src/main/java/net/pterodactylus/sone/web/DeletePostPage.java @@ -38,7 +38,7 @@ public class DeletePostPage extends SoneTemplatePage { * The Sone web interface */ public DeletePostPage(Template template, WebInterface webInterface) { - super("deletePost.html", template, "Page.DeletePost.Title", webInterface); + super("deletePost.html", template, "Page.DeletePost.Title", webInterface, true); } // @@ -54,14 +54,14 @@ public class DeletePostPage extends SoneTemplatePage { if (request.getMethod() == Method.GET) { String postId = request.getHttpRequest().getParam("post"); String returnPage = request.getHttpRequest().getParam("returnPage"); - Post post = webInterface.core().getPost(postId); + Post post = webInterface.getCore().getPost(postId); template.set("post", post); template.set("returnPage", returnPage); return; } else if (request.getMethod() == Method.POST) { String postId = request.getHttpRequest().getPartAsStringFailsafe("post", 36); String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); - Post post = webInterface.core().getPost(postId); + Post post = webInterface.getCore().getPost(postId); Sone currentSone = getCurrentSone(request.getToadletContext()); if (!post.getSone().equals(currentSone)) { throw new RedirectException("noPermission.html"); @@ -77,16 +77,4 @@ public class DeletePostPage extends SoneTemplatePage { } } - // - // SONETEMPLATEPAGE METHODS - // - - /** - * {@inheritDoc} - */ - @Override - protected boolean requiresLogin() { - return true; - } - }