From: David ‘Bombe’ Roden Date: Mon, 27 Jul 2015 18:30:21 +0000 (+0200) Subject: Merge branch 'next' into feature/album-and-image-links X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=cc18e5878bc71081da5137eb777d91821c3f4cce;p=Sone.git Merge branch 'next' into feature/album-and-image-links --- cc18e5878bc71081da5137eb777d91821c3f4cce diff --cc src/main/java/net/pterodactylus/sone/web/WebInterface.java index 974299d,beba513..06ebf8d --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@@ -249,10 -243,11 +246,11 @@@ public class WebInterface * The Sone plugin */ @Inject - public WebInterface(SonePlugin sonePlugin) { + public WebInterface(SonePlugin sonePlugin, Loaders loaders) { this.sonePlugin = sonePlugin; + this.loaders = loaders; formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword(); - soneTextParser = new SoneTextParser(getCore(), getCore()); + soneTextParser = new SoneTextParser(getCore(), getCore(), getCore()); templateContextFactory = new TemplateContextFactory(); templateContextFactory.addAccessor(Object.class, new ReflectionAccessor()); @@@ -289,9 -283,8 +287,9 @@@ templateContextFactory.addFilter("unique", new UniqueElementFilter()); templateContextFactory.addFilter("mod", new ModFilter()); templateContextFactory.addFilter("paginate", new PaginationFilter()); + templateContextFactory.addFilter("build-id", new BuildIdFilter()); templateContextFactory.addProvider(TemplateProvider.TEMPLATE_CONTEXT_PROVIDER); - templateContextFactory.addProvider(new ClassPathTemplateProvider(WebInterface.class, "/templates/")); + templateContextFactory.addProvider(loaders.getTemplateProvider()); templateContextFactory.addTemplateObject("webInterface", this); templateContextFactory.addTemplateObject("formPassword", formPassword);