Don't return a replay URL for private games.

The URL wouldn't work anyway.
This commit is contained in:
Pentarctagon 2021-02-16 23:09:30 -06:00 committed by Pentarctagon
parent cd2dd8dc7f
commit 387f4ae448

View file

@ -125,7 +125,11 @@ std::unique_ptr<simple_wml::document> 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 "