From afbba3f841c4bec8810c80891de4388629b2b25f Mon Sep 17 00:00:00 2001 From: Ferywir <65760459+Ferywir@users.noreply.github.com> Date: Sun, 21 Jun 2026 20:04:56 +0200 Subject: [PATCH] fix(reports): pass aid on vilview report links so ally reports open [#246] (#247) --- Templates/Map/vilview.tpl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Templates/Map/vilview.tpl b/Templates/Map/vilview.tpl index a1a9ec49..08cbd75f 100644 --- a/Templates/Map/vilview.tpl +++ b/Templates/Map/vilview.tpl @@ -68,7 +68,13 @@ function renderReports($database,$generator,$session,$d,$limit,$typeMap=null){ $icon = ''; } $date = $generator->procMtime($row['time']); - echo ''.$icon.' '.$date[0].' '.substr($date[1],0,5).''; + // Reports here are selected by `ally = session alliance` (shared alliance + // reports) whenever the viewer is in an alliance, so they may be owned by + // an ally rather than the viewer. berichte.php only renders such a report + // when the `aid` param is present (its uid-owner branch fails for allies), + // hence the blank page. Append &aid= like Alliance/attacks.tpl does. + $link = 'berichte.php?id='.$row['id'].($session->alliance? '&aid='.(int)$session->alliance : ''); + echo ''.$icon.' '.$date[0].' '.substr($date[1],0,5).''; } } ?>