]> ruin.nu Git - ndwebbie.git/commitdiff
fixed a minor bug with changing row colors
authorMichael Andreen <harv@ruin.nu>
Fri, 28 Dec 2007 15:12:31 +0000 (16:12 +0100)
committerMichael Andreen <harv@ruin.nu>
Fri, 28 Dec 2007 15:12:31 +0000 (16:12 +0100)
NDWeb/Pages/Main.pm

index d32124827d5bf0f0af441f09e9ebfc846bbc1a1b..45fdd35c663a9a08b2e877f6b38d4fe66bfcfea9 100644 (file)
@@ -224,12 +224,12 @@ ORDER BY x,y,z,mission,tick
        my @fleets;
        $i = 0;
        while (my $fleet = $query->fetchrow_hashref){
-               $fleet->{ODD} = $i % 2;
+               $fleet->{ODD} = $i++ % 2;
                my @ships;
                $ships->execute($fleet->{id});
                my $j = 0;
                while (my $ship = $ships->fetchrow_hashref){
-                       $ship->{ODD} = $i++ % 2;
+                       $ship->{ODD} = $j++ % 2;
                        push @ships,$ship;
                }
                $fleet->{ships} = \@ships;