From 8b32d7e04676888e15f04046f148f02807cfa021 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 15 Oct 2010 21:50:31 +0200 Subject: [PATCH] Use post accessor. --- src/main/java/net/pterodactylus/sone/web/WebInterface.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index ad7e510..994d501 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -29,9 +29,11 @@ import java.util.logging.Level; import java.util.logging.Logger; import net.pterodactylus.sone.core.Core; +import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Sone; 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.web.page.PageToadlet; import net.pterodactylus.sone.web.page.PageToadletFactory; @@ -143,6 +145,7 @@ public class WebInterface extends AbstractService { DefaultTemplateFactory templateFactory = new DefaultTemplateFactory(); templateFactory.addAccessor(Object.class, new ReflectionAccessor()); templateFactory.addAccessor(Sone.class, new SoneAccessor()); + templateFactory.addAccessor(Post.class, new PostAccessor(core())); templateFactory.addFilter("date", new DateFilter()); templateFactory.addFilter("l10n", new L10nFilter(l10n())); -- 2.7.4