X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FAlbumAccessor.java;h=e22e00bef5bec40e1bf4f350cae39b6303925a75;hp=0eea2312fce4e57cd7cc83f7d9e69834f9c56dfc;hb=5723a2bb28376b0972a63bae2124846116cf6ca5;hpb=da49879f2d335afde8f913f13458a62692fa141c diff --git a/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java b/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java index 0eea231..e22e00b 100644 --- a/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java +++ b/src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java @@ -1,5 +1,5 @@ /* - * Sone - AlbumAccessor.java - Copyright © 2011 David Roden + * Sone - AlbumAccessor.java - Copyright © 2011–2012 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 @@ -46,7 +46,7 @@ public class AlbumAccessor extends ReflectionAccessor { List> backlinks = new ArrayList>(); Album currentAlbum = album; while (currentAlbum != null) { - backlinks.add(0, createLink("imageBrowser.html?album=" + album.getId(), album.getName())); + backlinks.add(0, createLink("imageBrowser.html?album=" + currentAlbum.getId(), currentAlbum.getTitle())); currentAlbum = currentAlbum.getParent(); } backlinks.add(0, createLink("imageBrowser.html?sone=" + album.getSone().getId(), SoneAccessor.getNiceName(album.getSone()))); @@ -68,7 +68,7 @@ public class AlbumAccessor extends ReflectionAccessor { * The name of the link * @return The created map containing the mappings */ - private Map createLink(String target, String name) { + private static Map createLink(String target, String name) { Map link = new HashMap(); link.put("target", target); link.put("name", name);