X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FDeletePostAjaxPage.java;h=3beb85dcd6868c02405a552e7e09d7185d2a8560;hb=14b1aa4bf4b88e80f9cce4ec14d0950727df4a5f;hp=ea2310c5cc5ee644e0bc63377f1408faf9596ef2;hpb=a47643aed43d118ca68044f95451bb5374cdb332;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.java index ea2310c..3beb85d 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/DeletePostAjaxPage.java @@ -1,5 +1,5 @@ /* - * Sone - DeletePostAjaxPage.java - Copyright © 2010–2012 David Roden + * Sone - DeletePostAjaxPage.java - Copyright © 2010–2013 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,11 +49,11 @@ public class DeletePostAjaxPage extends JsonPage { @Override protected JsonObject createJsonObject(FreenetRequest request) { String postId = request.getHttpRequest().getParam("post"); - Post post = webInterface.getCore().getPost(postId, false); + Post post = webInterface.getCore().getPost(postId); if ((post == null) || (post.getSone() == null)) { return createErrorJsonObject("invalid-post-id"); } - if (!webInterface.getCore().isLocalSone(post.getSone())) { + if (!post.getSone().isLocal()) { return createErrorJsonObject("not-authorized"); } webInterface.getCore().deletePost(post);