diff --git a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/GameHistoryDAO.java b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/GameHistoryDAO.java index 0f9ad2b14..152236479 100644 --- a/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/GameHistoryDAO.java +++ b/gemp-lotr/gemp-lotr-server/src/main/java/com/gempukku/lotro/db/GameHistoryDAO.java @@ -49,7 +49,7 @@ public class GameHistoryDAO { try { Connection connection = _dbAccess.getDataSource().getConnection(); try { - PreparedStatement statement = connection.prepareStatement("select winner, loser, win_reason, lose_reason, win_recording_id, lose_recording_id, start_date, end_date from game_history where winner=? or loser=? order by end_date deck limit ?, ?"); + PreparedStatement statement = connection.prepareStatement("select winner, loser, win_reason, lose_reason, win_recording_id, lose_recording_id, start_date, end_date from game_history where winner=? or loser=? order by end_date desc limit ?, ?"); try { statement.setString(1, player.getName()); statement.setString(2, player.getName()); diff --git a/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java b/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java index ed155062c..e60552d24 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java +++ b/gemp-lotr/gemp-lotr-web/src/main/java/com/gempukku/lotro/server/ServerResource.java @@ -155,11 +155,10 @@ public class ServerResource { }; } - @Path("/gameHistory/{playerId}") + @Path("/gameHistory") @GET @Produces(MediaType.APPLICATION_XML) public Document getGameHistory( - @PathParam("playerId") String playerId, @QueryParam("start") int start, @QueryParam("count") int count, @QueryParam("participantId") String participantId, @@ -194,9 +193,9 @@ public class ServerResource { historyEntry.setAttribute("winReason", gameHistoryEntry.getWinReason()); historyEntry.setAttribute("loseReason", gameHistoryEntry.getLoseReason()); - if (gameHistoryEntry.getWinner().equals(participantId)) + if (gameHistoryEntry.getWinner().equals(participantId) && gameHistoryEntry.getWinnerRecording() != null) historyEntry.setAttribute("gameRecordingId", gameHistoryEntry.getWinnerRecording()); - else if (gameHistoryEntry.getLoser().equals(participantId)) + else if (gameHistoryEntry.getLoser().equals(participantId) && gameHistoryEntry.getLoserRecording() != null) historyEntry.setAttribute("gameRecordingId", gameHistoryEntry.getLoserRecording()); historyEntry.setAttribute("startTime", String.valueOf(gameHistoryEntry.getStartTime().getTime())); diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html index e8172db4b..1956bf1fa 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/hall.html @@ -82,6 +82,11 @@ padding: .2em .5em; } + .gameHistory td, .gameHistory th { + padding: 2px; + border: 1px solid white; + } + @@ -90,6 +95,7 @@ + @@ -132,6 +138,7 @@