Store the core in all template contexts.
[Sone.git] / src / main / java / net / pterodactylus / sone / web / ajax / GetPostAjaxPage.java
index f12f603..f56c5b7 100644 (file)
@@ -81,6 +81,8 @@ public class GetPostAjaxPage extends JsonPage {
         * Creates a JSON object from the given post. The JSON object will only
         * contain the ID of the post, its time, and its rendered HTML code.
         *
+        * @param request
+        *            The request being processed
         * @param post
         *            The post to create a JSON object from
         * @param currentSone
@@ -95,6 +97,7 @@ public class GetPostAjaxPage extends JsonPage {
                jsonPost.put("time", post.getTime());
                StringWriter stringWriter = new StringWriter();
                TemplateContext templateContext = webInterface.getTemplateContextFactory().createTemplateContext();
+               templateContext.set("core", webInterface.getCore());
                templateContext.set("request", request);
                templateContext.set("post", post);
                templateContext.set("currentSone", currentSone);