X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FDeletePostAjaxPage.java;h=b822e52ad0d58f33f21f5249f1c4283dba2ecb30;hb=a88e930a23b550dae75116d7759924d760941776;hp=37ab040cd027ab230adefd16a339fb7c13a6eb7a;hpb=45f92ec63dbf8134d92ceed67294faa38117b195;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 37ab040..b822e52 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 David Roden + * Sone - DeletePostAjaxPage.java - Copyright © 2010–2012 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 @@ -53,7 +53,7 @@ public class DeletePostAjaxPage extends JsonPage { 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);