X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FUnknownDateFilter.java;h=0d4872bd4c6e998974f3c67f8d9159c85cd7f84b;hp=4fc95f71069afa8dc5c36793e09417a6e0a3fc95;hb=179e7da4d8d8a474d0b622d60b5f5d32d6ab4052;hpb=5d18f62236a3771c4efa05d96c2851b95366a7dd diff --git a/src/main/java/net/pterodactylus/sone/template/UnknownDateFilter.java b/src/main/java/net/pterodactylus/sone/template/UnknownDateFilter.java index 4fc95f7..0d4872b 100644 --- a/src/main/java/net/pterodactylus/sone/template/UnknownDateFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/UnknownDateFilter.java @@ -1,5 +1,5 @@ /* - * Sone - UnknownDateFilter.java - Copyright © 2011 David Roden + * Sone - UnknownDateFilter.java - Copyright © 2011–2019 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 @@ -19,15 +19,13 @@ package net.pterodactylus.sone.template; import java.util.Map; -import net.pterodactylus.util.template.DataProvider; import net.pterodactylus.util.template.Filter; +import net.pterodactylus.util.template.TemplateContext; import freenet.l10n.BaseL10n; /** * {@link Filter} implementation that replaces a {@link Long} with a value of * {@code 0} by a {@link String} from an {@link BaseL10n l10n handler}. - * - * @author David ‘Bombe’ Roden */ public class UnknownDateFilter implements Filter { @@ -54,7 +52,7 @@ public class UnknownDateFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(DataProvider dataProvider, Object data, Map parameters) { + public Object format(TemplateContext templateContext, Object data, Map parameters) { if (data instanceof Long) { if ((Long) data == 0) { return l10nHandler.getString(unknownKey);