X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fajax%2FGetNotificationsAjaxPage.java;h=59c6b2f7ee2543f761cc2164f82c92c3916bd793;hb=128580ddb154ce7d4f12108a8a70a8fe12488ffe;hp=512a95464bc185fac04eecb045608da472625e47;hpb=3da1daa6488c642430858a4baacc0aa986a6ebc1;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java index 512a954..59c6b2f 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/GetNotificationsAjaxPage.java @@ -1,5 +1,5 @@ /* - * Sone - GetNotificationsAjaxPage.java - Copyright © 2011–2015 David Roden + * Sone - GetNotificationsAjaxPage.java - Copyright © 2011–2016 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -79,7 +79,7 @@ public class GetNotificationsAjaxPage extends JsonPage { */ @Override protected JsonReturnObject createJsonObject(FreenetRequest request) { - Sone currentSone = getCurrentSone(request.getToadletContext(), false); + Sone currentSone = getCurrentSoneWithoutCreatingSession(request.getToadletContext()); List notifications = new ArrayList(webInterface.getNotifications(currentSone)); Collections.sort(notifications, Notification.CREATED_TIME_SORTER); ArrayNode jsonNotifications = new ArrayNode(instance); @@ -110,10 +110,10 @@ public class GetNotificationsAjaxPage extends JsonPage { if (notification instanceof TemplateNotification) { TemplateContext templateContext = webInterface.getTemplateContextFactory().createTemplateContext().mergeContext(((TemplateNotification) notification).getTemplateContext()); templateContext.set("core", webInterface.getCore()); - templateContext.set("currentSone", webInterface.getCurrentSone(request.getToadletContext(), false)); + templateContext.set("currentSone", webInterface.getCurrentSoneWithoutCreatingSession(request.getToadletContext())); templateContext.set("localSones", webInterface.getCore().getLocalSones()); templateContext.set("request", request); - templateContext.set("currentVersion", SonePlugin.VERSION); + templateContext.set("currentVersion", SonePlugin.getPluginVersion()); templateContext.set("hasLatestVersion", webInterface.getCore().getUpdateChecker().hasLatestVersion()); templateContext.set("latestEdition", webInterface.getCore().getUpdateChecker().getLatestEdition()); templateContext.set("latestVersion", webInterface.getCore().getUpdateChecker().getLatestVersion());