/*
- * 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
*/
@Override
protected JsonReturnObject createJsonObject(FreenetRequest request) {
- Sone currentSone = getCurrentSone(request.getToadletContext(), false);
+ Sone currentSone = getCurrentSoneWithoutCreatingSession(request.getToadletContext());
List<Notification> notifications = new ArrayList<Notification>(webInterface.getNotifications(currentSone));
Collections.sort(notifications, Notification.CREATED_TIME_SORTER);
ArrayNode jsonNotifications = new ArrayNode(instance);
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());