/*
- * Sone - MarkReadPage.java - Copyright © 2011 David Roden
+ * Sone - MarkAsKnownPage.java - Copyright © 2011–2013 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
import java.util.StringTokenizer;
import net.pterodactylus.sone.data.Post;
+import net.pterodactylus.sone.data.PostReply;
import net.pterodactylus.sone.data.Reply;
import net.pterodactylus.sone.data.Sone;
+import net.pterodactylus.sone.web.page.FreenetRequest;
import net.pterodactylus.util.template.Template;
import net.pterodactylus.util.template.TemplateContext;
* {@inheritDoc}
*/
@Override
- protected void processTemplate(Request request, TemplateContext templateContext) throws RedirectException {
+ protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
super.processTemplate(request, templateContext);
String type = request.getHttpRequest().getPartAsStringFailsafe("type", 5);
if (!type.equals("sone") && !type.equals("post") && !type.equals("reply")) {
for (StringTokenizer idTokenizer = new StringTokenizer(ids); idTokenizer.hasMoreTokens();) {
String id = idTokenizer.nextToken();
if (type.equals("post")) {
- Post post = webInterface.getCore().getPost(id, false);
+ Post post = webInterface.getCore().getPost(id);
if (post == null) {
continue;
}
webInterface.getCore().markPostKnown(post);
} else if (type.equals("reply")) {
- Reply reply = webInterface.getCore().getReply(id, false);
+ PostReply reply = webInterface.getCore().getPostReply(id);
if (reply == null) {
continue;
}
webInterface.getCore().markReplyKnown(reply);
} else if (type.equals("sone")) {
- Sone sone = webInterface.getCore().getSone(id, false);
+ Sone sone = webInterface.getCore().getSone(id);
if (sone == null) {
continue;
}