Store locality of a Sone in the Sone itself.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / DeletePostPage.java
index c8fd20f..314689e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - DeletePostPage.java - Copyright © 2010 David Roden
+ * Sone - DeletePostPage.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
@@ -63,7 +63,7 @@ public class DeletePostPage extends SoneTemplatePage {
                        String postId = request.getHttpRequest().getPartAsStringFailsafe("post", 36);
                        String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256);
                        Post post = webInterface.getCore().getPost(postId);
-                       if (!webInterface.getCore().isLocalSone(post.getSone())) {
+                       if (!post.getSone().isLocal()) {
                                throw new RedirectException("noPermission.html");
                        }
                        if (request.getHttpRequest().isPartSet("confirmDelete")) {