]> ruin.nu Git - ndwebbie.git/blobdiff - NDWeb/Pages/GalaxyRankings.pm
Converted settings to catalyst
[ndwebbie.git] / NDWeb / Pages / GalaxyRankings.pm
index d09c8e592eb547e3e227b17b9e99d40fa7f81000..318f4f47986f1deb60188e54de3f1e21e24781ba 100644 (file)
 #   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);