*
* 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
*
* 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
- super("markAsKnown.html", template, "Page.MarkRead.Title", webInterface);
+ super("markAsKnown.html", template, "Page.MarkAsKnown.Title", webInterface);
- protected void processTemplate(Request request, DataProvider dataProvider) throws RedirectException {
- super.processTemplate(request, dataProvider);
+ protected void handleRequest(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
String type = request.getHttpRequest().getPartAsStringFailsafe("type", 5);
if (!type.equals("sone") && !type.equals("post") && !type.equals("reply")) {
throw new RedirectException("invalid.html");
String type = request.getHttpRequest().getPartAsStringFailsafe("type", 5);
if (!type.equals("sone") && !type.equals("post") && !type.equals("reply")) {
throw new RedirectException("invalid.html");
String ids = request.getHttpRequest().getPartAsStringFailsafe("id", 65536);
for (StringTokenizer idTokenizer = new StringTokenizer(ids); idTokenizer.hasMoreTokens();) {
String id = idTokenizer.nextToken();
String ids = request.getHttpRequest().getPartAsStringFailsafe("id", 65536);
for (StringTokenizer idTokenizer = new StringTokenizer(ids); idTokenizer.hasMoreTokens();) {
String id = idTokenizer.nextToken();
- webInterface.getCore().markReplyKnown(reply);
- } else if (type.equals("sone")) {
- Sone sone = webInterface.getCore().getSone(id, false);
- if (sone == null) {
+ webInterface.getCore().markReplyKnown(reply.get());
+ } else {
+ Optional<Sone> sone = webInterface.getCore().getSone(id);
+ if (!sone.isPresent()) {