If no current Sone exists, return an error.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / CreateReplyPage.java
index ef83c71..4811997 100644 (file)
@@ -52,9 +52,6 @@ public class CreateReplyPage extends SoneTemplatePage {
        // TEMPLATEPAGE METHODS
        //
 
-       /**
-        * {@inheritDoc}
-        */
        @Override
        protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
                super.processTemplate(request, templateContext);
@@ -62,7 +59,7 @@ public class CreateReplyPage extends SoneTemplatePage {
                String text = request.getHttpRequest().getPartAsStringFailsafe("text", 65536).trim();
                String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256);
                if (request.getMethod() == Method.POST) {
-                       Optional<Post> post = webInterface.getCore().getPost(postId);
+                       Optional<Post> post = webInterface.getCore().getDatabase().getPost(postId);
                        if (!post.isPresent()) {
                                throw new RedirectException("noPermission.html");
                        }