Store current edition in template context for inserted files.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 24 Apr 2011 12:37:06 +0000 (14:37 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 24 Apr 2011 12:37:06 +0000 (14:37 +0200)
src/main/java/net/pterodactylus/sone/core/SoneInserter.java

index d24b564..0abebc3 100644 (file)
@@ -247,7 +247,7 @@ public class SoneInserter extends AbstractService {
         *
         * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
         */
-       private static class InsertInformation {
+       private class InsertInformation {
 
                /** All properties of the Sone, copied for thread safety. */
                private final Map<String, Object> soneProperties = new HashMap<String, Object>();
@@ -346,6 +346,7 @@ public class SoneInserter extends AbstractService {
 
                        TemplateContext templateContext = templateContextFactory.createTemplateContext();
                        templateContext.set("currentSone", soneProperties);
+                       templateContext.set("currentEdition", core.getUpdateChecker().getLatestEdition());
                        templateContext.set("version", SonePlugin.VERSION);
                        StringWriter writer = new StringWriter();
                        StringBucket bucket = null;