From: David ‘Bombe’ Roden Date: Mon, 18 Oct 2010 19:08:08 +0000 (+0200) Subject: Add substring filter to all templates. X-Git-Tag: 0.1-RC1~221 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f14e4b821f2542114dec9cd085a05e81d1f0c816;p=Sone.git Add substring filter to all templates. --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 9305215..49084d8 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -35,6 +35,7 @@ import net.pterodactylus.sone.freenet.L10nFilter; import net.pterodactylus.sone.main.SonePlugin; import net.pterodactylus.sone.template.PostAccessor; import net.pterodactylus.sone.template.SoneAccessor; +import net.pterodactylus.sone.template.SubstringFilter; import net.pterodactylus.sone.web.page.PageToadlet; import net.pterodactylus.sone.web.page.PageToadletFactory; import net.pterodactylus.sone.web.page.StaticPage; @@ -151,6 +152,7 @@ public class WebInterface extends AbstractService { templateFactory.addAccessor(Post.class, new PostAccessor(core())); templateFactory.addFilter("date", new DateFilter()); templateFactory.addFilter("l10n", new L10nFilter(l10n())); + templateFactory.addFilter("substring", new SubstringFilter()); templateFactory.setTemplateProvider(new ClassPathTemplateProvider(templateFactory)); String formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword();