X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FViewSonePage.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FViewSonePage.java;h=592404f99f1fe361ac209ab805bc844832fc4020;hp=5572bca16181877b3193bb6df0705d395a647101;hb=8f02544d31f323ae9053dd9a11a99eacd8cf5bcd;hpb=1a31c9d080f15faa3d762275f08d124435c7621a diff --git a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java index 5572bca..592404f 100644 --- a/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java +++ b/src/main/java/net/pterodactylus/sone/web/ViewSonePage.java @@ -67,7 +67,7 @@ public class ViewSonePage extends SoneTemplatePage { @Override protected String getPageTitle(FreenetRequest request) { String soneId = request.getHttpRequest().getParam("sone"); - Sone sone = webInterface.getCore().getSone(soneId, false); + Sone sone = webInterface.getCore().getSone(soneId); if ((sone != null) && (sone.getTime() > 0)) { String soneName = SoneAccessor.getNiceName(sone); return soneName + " - " + webInterface.getL10n().getString("Page.ViewSone.Title"); @@ -82,14 +82,14 @@ public class ViewSonePage extends SoneTemplatePage { protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException { super.processTemplate(request, templateContext); String soneId = request.getHttpRequest().getParam("sone"); - Sone sone = webInterface.getCore().getSone(soneId, false); + Sone sone = webInterface.getCore().getSone(soneId); templateContext.set("sone", sone); templateContext.set("soneId", soneId); if (sone == null) { return; } List sonePosts = sone.getPosts(); - sonePosts.addAll(webInterface.getCore().getDirectedPosts(sone)); + sonePosts.addAll(webInterface.getCore().getDirectedPosts(sone.getId())); Collections.sort(sonePosts, Post.TIME_COMPARATOR); Pagination postPagination = new Pagination(sonePosts, webInterface.getCore().getPreferences().getPostsPerPage()).setPage(Numbers.safeParseInteger(request.getHttpRequest().getParam("postPage"), 0)); templateContext.set("postPagination", postPagination);