diff --git a/src/server/common/dbconn.cpp b/src/server/common/dbconn.cpp index b76724a63f2f..00085d39e2d4 100644 --- a/src/server/common/dbconn.cpp +++ b/src/server/common/dbconn.cpp @@ -125,7 +125,11 @@ std::unique_ptr dbconn::get_game_history(int player_id, in " IFNULL(era.ID, '') as ERA_ID, " " IFNULL(GROUP_CONCAT(distinct mods.NAME, '') as MODIFICATION_NAMES, " " IFNULL(GROUP_CONCAT(distinct mods.ID), '') as MODIFICATION_IDS, " -" concat('https://replays.wesnoth.org/', substring(game.INSTANCE_VERSION, 1, 4), '/', year(game.END_TIME), '/', lpad(month(game.END_TIME), 2, '0'), '/', lpad(day(game.END_TIME), 2, '0'), '/', game.REPLAY_NAME) as REPLAY_URL " +" case " +" when game.PUBLIC = 1 " +" then concat('https://replays.wesnoth.org/', substring(game.INSTANCE_VERSION, 1, 4), '/', year(game.END_TIME), '/', lpad(month(game.END_TIME), 2, '0'), '/', lpad(day(game.END_TIME), 2, '0'), '/', game.REPLAY_NAME) " +" else '' " +" end as REPLAY_URL " "from "+db_game_info_table_+" game " "inner join "+db_game_player_info_table_+" player " " on exists "