From 1032d95f41cb21d142f320cc6383646e7f14fa42 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 30 Jul 2012 13:46:16 +0200 Subject: [PATCH] Set core and data manager in all templates. --- src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java b/src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java index 65505fa..f6f211e 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/page/BasePage.java @@ -60,6 +60,8 @@ public class BasePage extends TemplatePage { super.processTemplate(templateContext, request); User currentUser = (User) request.getServletRequest().getSession().getAttribute("currentUser"); templateContext.set("currentUser", currentUser); + templateContext.set("core", getCore()); + templateContext.set("dataManager", getCore().getDataManager()); int requiredUserLevel = getRequiredUserLevel(); if (((currentUser == null) && (requiredUserLevel > 0)) || ((currentUser != null) && (requiredUserLevel > currentUser.getLevel()))) { throw new RedirectException("login"); -- 2.7.4