From: Michael Andreen Date: Thu, 18 Jun 2020 16:03:46 +0000 (+0200) Subject: Don't show unit scans in raid if they're older than the AU X-Git-Url: https://ruin.nu/git/?p=ndwebbie.git;a=commitdiff_plain;h=612f5232bc9d8966b209da8f04cf0fb5619f867e Don't show unit scans in raid if they're older than the AU --- 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;