From fe3398d54c5b8eda7c2ff14befb299155fe8e4b5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 29 Jul 2012 11:56:59 +0200 Subject: [PATCH] Fix storage of current user in the template. --- src/main/java/net/pterodactylus/demoscenemusic/page/ArtistPage.java | 1 + src/main/java/net/pterodactylus/demoscenemusic/page/ArtistsPage.java | 1 + src/main/java/net/pterodactylus/demoscenemusic/page/TrackPage.java | 1 + 3 files changed, 3 insertions(+) diff --git a/src/main/java/net/pterodactylus/demoscenemusic/page/ArtistPage.java b/src/main/java/net/pterodactylus/demoscenemusic/page/ArtistPage.java index 45ef5c9..aacab5d 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/page/ArtistPage.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/page/ArtistPage.java @@ -51,6 +51,7 @@ public class ArtistPage extends BasePage { */ @Override protected void processTemplate(TemplateContext templateContext, ServletRequest request) throws RedirectException { + super.processTemplate(templateContext, request); try { Artist artist = getCore().getDataManager().getArtistById(request.getServletRequest().getParameter("id")); templateContext.set("artist", artist); diff --git a/src/main/java/net/pterodactylus/demoscenemusic/page/ArtistsPage.java b/src/main/java/net/pterodactylus/demoscenemusic/page/ArtistsPage.java index 042a46a..3dfe636 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/page/ArtistsPage.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/page/ArtistsPage.java @@ -49,6 +49,7 @@ public class ArtistsPage extends BasePage { */ @Override protected void processTemplate(TemplateContext templateContext, ServletRequest request) throws RedirectException { + super.processTemplate(templateContext, request); try { Collection artists = getCore().getDataManager().getAllArtists(); templateContext.set("artists", artists); diff --git a/src/main/java/net/pterodactylus/demoscenemusic/page/TrackPage.java b/src/main/java/net/pterodactylus/demoscenemusic/page/TrackPage.java index 9089046..c35c692 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/page/TrackPage.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/page/TrackPage.java @@ -50,6 +50,7 @@ public class TrackPage extends BasePage { */ @Override protected void processTemplate(TemplateContext templateContext, ServletRequest request) throws RedirectException { + super.processTemplate(templateContext, request); try { templateContext.set("track", getCore().getDataManager().getTrackById(request.getServletRequest().getParameter("id"))); } catch (DatabaseException de1) { -- 2.7.4