From: David ‘Bombe’ Roden Date: Wed, 21 Sep 2011 18:48:15 +0000 (+0200) Subject: Add mod filter to template context factory. X-Git-Tag: 0.7^2~2^2~50 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=18c7f39b1bf13f122fde28b10b07024a74eaec36;p=Sone.git Add mod filter to template context factory. --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 6ea8957..4572497 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -115,6 +115,7 @@ import net.pterodactylus.util.template.DateFilter; import net.pterodactylus.util.template.FormatFilter; import net.pterodactylus.util.template.HtmlFilter; import net.pterodactylus.util.template.MatchFilter; +import net.pterodactylus.util.template.ModFilter; import net.pterodactylus.util.template.Provider; import net.pterodactylus.util.template.ReflectionAccessor; import net.pterodactylus.util.template.ReplaceFilter; @@ -246,6 +247,7 @@ public class WebInterface implements CoreListener { templateContextFactory.addFilter("replyGroup", new ReplyGroupFilter()); templateContextFactory.addFilter("in", new ContainsFilter()); templateContextFactory.addFilter("unique", new UniqueElementFilter()); + templateContextFactory.addFilter("mod", new ModFilter()); templateContextFactory.addProvider(Provider.TEMPLATE_CONTEXT_PROVIDER); templateContextFactory.addProvider(new ClassPathTemplateProvider()); templateContextFactory.addTemplateObject("webInterface", this);