X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=NDWeb%2FPages%2FIntel.pm;h=bd9777aeac0b787fd2ebba1f1c9876a8174aac61;hb=eb2ec45ab96b0968c5bfc5d17ec6c6d7a57ebe37;hp=3dc69b203ce8b07d7690263b5ffa74ec0fab686f;hpb=4e8a42b55b7dfce191bd84a1ed31b3831db9f7fb;p=ndwebbie.git diff --git a/NDWeb/Pages/Intel.pm b/NDWeb/Pages/Intel.pm index 3dc69b2..bd9777a 100644 --- a/NDWeb/Pages/Intel.pm +++ b/NDWeb/Pages/Intel.pm @@ -171,15 +171,12 @@ sub render_body { $query->execute($planet->{id}) or $error .= $DBH->errstr; my @intellists; my @incomings; - my $i = 0; while (my $intel = $query->fetchrow_hashref){ if ($intel->{ingal}){ $intel->{missionclass} = 'ingal'; }else{ $intel->{missionclass} = $intel->{mission}; } - $i++; - $intel->{ODD} = $i % 2; push @incomings,$intel; } push @intellists,{Message => 'Incoming fleets', Intel => \@incomings, Origin => 1}; @@ -187,15 +184,12 @@ sub render_body { $query = $DBH->prepare(intelquery('t.alliance AS talliance,coords(t.x,t.y,t.z) AS target',"o.id = ? $showticks")); $query->execute($planet->{id}) or $error .= $DBH->errstr; my @outgoings; - $i = 0; while (my $intel = $query->fetchrow_hashref){ if ($intel->{ingal}){ $intel->{missionclass} = 'ingal'; }else{ $intel->{missionclass} = $intel->{mission}; } - $i++; - $intel->{ODD} = $i % 2; push @outgoings,$intel; } push @intellists,{Message => 'Outgoing Fleets', Intel => \@outgoings, Target => 1}; @@ -212,15 +206,12 @@ sub render_body { my @intellists; my @intel; - my $i = 0; while (my $intel = $query->fetchrow_hashref){ if ($intel->{ingal}){ $intel->{missionclass} = 'ingal'; }else{ $intel->{missionclass} = $intel->{mission}; } - $i++; - $intel->{ODD} = $i % 2; push @intel,$intel; } push @intellists,{Message => q{Intel where alliances doesn't match}, Intel => \@intel, Origin => 1, Target => 1};