X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=NDWeb%2FPages%2FTargetList.pm;h=97c0be4fdcfcb9594d60a9d611e81fde13678f33;hb=57f880656c4486f68583058121a5bcb3b316199c;hp=67c4653d2fd9cfbdfd284bd863c55359a937e115;hpb=d6c9085e748c4d61901aaea72f0e1546dcc7cdda;p=ndwebbie.git diff --git a/NDWeb/Pages/TargetList.pm b/NDWeb/Pages/TargetList.pm index 67c4653..97c0be4 100644 --- a/NDWeb/Pages/TargetList.pm +++ b/NDWeb/Pages/TargetList.pm @@ -17,16 +17,16 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * #**************************************************************************/ -package ND::Web::Pages::TargetList; +package NDWeb::Pages::TargetList; use strict; use warnings FATAL => 'all'; use ND::Include; use CGI qw/:standard/; -use ND::Web::Include; +use NDWeb::Include; -use base qw/ND::Web::XMLPage/; +use base qw/NDWeb::XMLPage/; -$ND::Web::Page::PAGES{targetList} = __PACKAGE__; +$NDWeb::Page::PAGES{targetList} = __PACKAGE__; sub render_body { my $self = shift; @@ -55,7 +55,7 @@ FROM current_planet_stats p JOIN (SELECT g.x,g.y, sum(p.value) AS nfvalue FROM galaxies g join current_planet_stats p on g.x = p.x AND g.y = p.y WHERE g.tick = (SELECT max(tick) from galaxies) - AND ((planet_status IS NULL OR NOT planet_status IN ('Friendly','NAP')) AND (relationship IS NULL OR NOT relationship IN ('Friendly','NAP'))) + AND ((NOT planet_status IN ('Friendly','NAP')) AND (NOT relationship IN ('Friendly','NAP'))) GROUP BY g.x,g.y ) g ON p.x = g.x AND p.y = g.y JOIN current_planet_stats pa ON pa.x = g.x AND pa.y = g.y @@ -66,10 +66,7 @@ ORDER BY $order }); $query->execute; my @alliances; - my $i = 0; while (my $alliance = $query->fetchrow_hashref){ - $i++; - $alliance->{ODD} = $i % 2; push @alliances,$alliance; } $BODY->param(Alliances => \@alliances);