X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FDismissNotificationPage.java;h=763271c570c1712fc1929d180feb2e449c0dcc2e;hp=4981afbd3be2d79ef24f5ecb2bf5e7a5dc4eafaa;hb=a47643aed43d118ca68044f95451bb5374cdb332;hpb=561524ab3db17469dddbd7d5ca3ffd8495a0b7a3 diff --git a/src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java b/src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java index 4981afb..763271c 100644 --- a/src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java +++ b/src/main/java/net/pterodactylus/sone/web/DismissNotificationPage.java @@ -1,5 +1,5 @@ /* - * Sone - DismissNotificationPage.java - Copyright © 2010 David Roden + * Sone - DismissNotificationPage.java - Copyright © 2010–2012 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 @@ -17,8 +17,10 @@ package net.pterodactylus.sone.web; +import net.pterodactylus.sone.web.page.FreenetRequest; import net.pterodactylus.util.notify.Notification; import net.pterodactylus.util.template.Template; +import net.pterodactylus.util.template.TemplateContext; /** * Page that lets the user dismiss a notification. @@ -47,14 +49,14 @@ public class DismissNotificationPage extends SoneTemplatePage { * {@inheritDoc} */ @Override - protected void processTemplate(Request request, Template template) throws RedirectException { - super.processTemplate(request, template); + protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException { + super.processTemplate(request, templateContext); String notificationId = request.getHttpRequest().getPartAsStringFailsafe("notification", 36); Notification notification = webInterface.getNotifications().getNotification(notificationId); if ((notification != null) && notification.isDismissable()) { notification.dismiss(); } - String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 64); + String returnPage = request.getHttpRequest().getPartAsStringFailsafe("returnPage", 256); throw new RedirectException(returnPage); }