From: David ‘Bombe’ Roden Date: Mon, 30 Jul 2012 11:46:16 +0000 (+0200) Subject: Set core and data manager in all templates. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1032d95f41cb21d142f320cc6383646e7f14fa42;p=demoscenemusic.git Set core and data manager in all templates. --- 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");