X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FViewPostPage.java;h=409c63a77acc5d3752e47842f3112e85bf3f44de;hb=e14e8aff491d7a04e4e04ed9c38bcae630195655;hp=3f44419e8101cd53d18d630d8a845516b39dca9e;hpb=80064be52c34c9d691da252d2628aa1f39debd23;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java b/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java index 3f44419..409c63a 100644 --- a/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ViewPostPage.java @@ -53,7 +53,7 @@ public class ViewPostPage extends SoneTemplatePage { @Override protected String getPageTitle(FreenetRequest request) { String postId = request.getHttpRequest().getParam("post"); - Optional post = webInterface.getCore().getPost(postId); + Optional post = webInterface.getCore().getDatabase().getPost(postId); String title = ""; if (post.isPresent()) { title = post.get().getText().substring(0, Math.min(20, post.get().getText().length())) + "…"; @@ -68,7 +68,7 @@ public class ViewPostPage extends SoneTemplatePage { super.processTemplate(request, templateContext); String postId = request.getHttpRequest().getParam("post"); boolean raw = request.getHttpRequest().getParam("raw").equals("true"); - Optional post = webInterface.getCore().getPost(postId); + Optional post = webInterface.getCore().getDatabase().getPost(postId); templateContext.set("post", post.orNull()); templateContext.set("raw", raw); }