/*
- * Sone - AlbumAccessor.java - Copyright © 2011 David Roden
+ * Sone - AlbumAccessor.java - Copyright © 2011–2013 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
if ("backlinks".equals(member)) {
List<Map<String, String>> backlinks = new ArrayList<Map<String, String>>();
Album currentAlbum = album;
- while (currentAlbum != null) {
+ while (!currentAlbum.equals(album.getSone().getRootAlbum())) {
backlinks.add(0, createLink("imageBrowser.html?album=" + currentAlbum.getId(), currentAlbum.getTitle()));
currentAlbum = currentAlbum.getParent();
}
* The name of the link
* @return The created map containing the mappings
*/
- private Map<String, String> createLink(String target, String name) {
+ private static Map<String, String> createLink(String target, String name) {
Map<String, String> link = new HashMap<String, String>();
link.put("target", target);
link.put("name", name);