X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FUnbookmarkPage.java;h=9cc266e844af92b2639dc6d692adb389e71644c9;hp=80b3ce6fab2af6914c98ea9b6e47b78063470c5f;hb=9acbc5bdec4ccb752e0856a501568b0bb6161579;hpb=1e9a08c2b73b16dc178437eb8c8025aaa083fcca diff --git a/src/main/java/net/pterodactylus/sone/web/UnbookmarkPage.java b/src/main/java/net/pterodactylus/sone/web/UnbookmarkPage.java index 80b3ce6..9cc266e 100644 --- a/src/main/java/net/pterodactylus/sone/web/UnbookmarkPage.java +++ b/src/main/java/net/pterodactylus/sone/web/UnbookmarkPage.java @@ -1,5 +1,5 @@ /* - * Sone - UnbookmarkPage.java - Copyright © 2011–2015 David Roden + * Sone - UnbookmarkPage.java - Copyright © 2011–2016 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 @@ -52,8 +52,7 @@ public class UnbookmarkPage extends SoneTemplatePage { * {@inheritDoc} */ @Override - protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException { - super.processTemplate(request, templateContext); + protected void handleRequest(FreenetRequest request, TemplateContext templateContext) throws RedirectException { if (request.getMethod() == Method.POST) { String id = request.getHttpRequest().getPartAsStringFailsafe("post", 36); String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); @@ -67,7 +66,7 @@ public class UnbookmarkPage extends SoneTemplatePage { if (id.equals("allNotLoaded")) { Set posts = webInterface.getCore().getBookmarkedPosts(); for (Post post : posts) { - if (post.isLoaded()) { + if (!post.isLoaded()) { webInterface.getCore().unbookmarkPost(post); } }