]> ruin.nu Git - ndwebbie.git/commitdiff
Don't show unit scans in raid if they're older than the AU
authorMichael Andreen <harv@ruin.nu>
Thu, 18 Jun 2020 16:03:46 +0000 (18:03 +0200)
committerMichael Andreen <harv@ruin.nu>
Thu, 18 Jun 2020 16:03:46 +0000 (18:03 +0200)
lib/NDWeb/Controller/Raids.pm

index a6492591be35f365abd670729144da410708f716..1b1335274ee3fd004daf9f236f97aa9b668cf0a1 100644 (file)
@@ -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;