Use correct album to create links.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 22 Mar 2011 19:56:40 +0000 (20:56 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 22 Mar 2011 19:56:40 +0000 (20:56 +0100)
src/main/java/net/pterodactylus/sone/template/AlbumAccessor.java

index 0eea231..510056d 100644 (file)
@@ -46,7 +46,7 @@ public class AlbumAccessor extends ReflectionAccessor {
                        List<Map<String, String>> backlinks = new ArrayList<Map<String, String>>();
                        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.getName()));
                                currentAlbum = currentAlbum.getParent();
                        }
                        backlinks.add(0, createLink("imageBrowser.html?sone=" + album.getSone().getId(), SoneAccessor.getNiceName(album.getSone())));