From 612f5232bc9d8966b209da8f04cf0fb5619f867e Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Thu, 18 Jun 2020 18:03:46 +0200 Subject: [PATCH] Don't show unit scans in raid if they're older than the AU --- lib/NDWeb/Controller/Raids.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/NDWeb/Controller/Raids.pm b/lib/NDWeb/Controller/Raids.pm index a649259..1b13352 100644 --- a/lib/NDWeb/Controller/Raids.pm +++ b/lib/NDWeb/Controller/Raids.pm @@ -158,8 +158,11 @@ ORDER BY name,tick DESC WHERE fid = ? ORDER BY num }); my @missions; + my $tick = 0; while (my $mission = $unitscans->fetchrow_hashref){ my @ships; + last if $mission->{tick} <= $tick; + $tick = $mission->{tick}; $ships->execute($mission->{fid}); while (my $ship = $ships->fetchrow_hashref){ push @ships,$ship; -- 2.39.2