X-Git-Url: https://git.pterodactylus.net/?p=WoTNS.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fwotns%2Fui%2Fweb%2FWebInterface.java;h=4d6364043a0d8cccc28846bb3381ef9e737adfc7;hp=18daf46354dbff53f1da6a07ea35275d68fb7d47;hb=e17750852b6d02aeb6270f6a7e2619ced1f4f9b7;hpb=a626746ba02e64402514c32a5317c33fdcd7be35 diff --git a/src/main/java/net/pterodactylus/wotns/ui/web/WebInterface.java b/src/main/java/net/pterodactylus/wotns/ui/web/WebInterface.java index 18daf46..4d63640 100644 --- a/src/main/java/net/pterodactylus/wotns/ui/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/wotns/ui/web/WebInterface.java @@ -35,11 +35,13 @@ import net.pterodactylus.util.web.StaticPage; import net.pterodactylus.wotns.freenet.wot.Identity; import net.pterodactylus.wotns.main.IdentityComparator; import net.pterodactylus.wotns.main.WoTNSPlugin; +import net.pterodactylus.wotns.template.HttpRequestAccessor; import net.pterodactylus.wotns.template.IdentityAccessor; import net.pterodactylus.wotns.web.FreenetRequest; import net.pterodactylus.wotns.web.PageToadlet; import net.pterodactylus.wotns.web.PageToadletFactory; import freenet.clients.http.ToadletContainer; +import freenet.support.api.HTTPRequest; /** * TODO @@ -60,6 +62,7 @@ public class WebInterface { templateContextFactory.addAccessor(Object.class, new ReflectionAccessor()); templateContextFactory.addAccessor(Identity.class, new IdentityAccessor()); + templateContextFactory.addAccessor(HTTPRequest.class, new HttpRequestAccessor()); templateContextFactory.addFilter("html", new HtmlFilter()); CollectionSortFilter sortFilter = new CollectionSortFilter(); sortFilter.addComparator(Identity.class, IdentityComparator.NAME);