X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=NDWeb%2FPages%2FGalaxyRankings.pm;h=318f4f47986f1deb60188e54de3f1e21e24781ba;hb=f2c438684b7835e8c2033999fcc020d9352afca8;hp=d09c8e592eb547e3e227b17b9e99d40fa7f81000;hpb=d6c9085e748c4d61901aaea72f0e1546dcc7cdda;p=ndwebbie.git diff --git a/NDWeb/Pages/GalaxyRankings.pm b/NDWeb/Pages/GalaxyRankings.pm index d09c8e5..318f4f4 100644 --- a/NDWeb/Pages/GalaxyRankings.pm +++ b/NDWeb/Pages/GalaxyRankings.pm @@ -17,15 +17,15 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * #**************************************************************************/ -package ND::Web::Pages::GalaxyRankings; +package NDWeb::Pages::GalaxyRankings; use strict; use warnings FATAL => 'all'; 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{galaxyrankings} = __PACKAGE__; +$NDWeb::Page::PAGES{galaxyrankings} = __PACKAGE__; sub parse { #TODO: Need to fix some links first @@ -80,7 +80,6 @@ sub render_body { ORDER BY $order LIMIT 100 OFFSET ?}); $query->execute($offset) or $error .= p($DBH->errstr); my @galaxies; - my $i = 0; while (my $galaxy = $query->fetchrow_hashref){ for my $type (qw/planets size score xp value/){ #$galaxy->{$type} = prettyValue($galaxy->{$type}); @@ -97,8 +96,6 @@ sub render_body { $galaxy->{$type} =~ s/(^[-+]?\d+?(?=(?>(?:\d{3})+)(?!\d))|\G\d{3}(?=\d))/$1,/g; #Add comma for ever 3 digits, i.e. 1000 => 1,000 } } - $i++; - $galaxy->{ODD} = $i % 2; push @galaxies,$galaxy; } $BODY->param(Galaxies => \@galaxies);