]> ruin.nu Git - ndwebbie.git/blobdiff - NDWeb/Pages/Points.pm
Don't show ingal launch confirmations as intel
[ndwebbie.git] / NDWeb / Pages / Points.pm
index 04c17dd4fa8f9f0cd3b322f21a7419a27d87164f..250900b6696389ac3ef14ce8ad4349fec9a3e3e7 100644 (file)
 #   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 #**************************************************************************/
 
-package ND::Web::Pages::Points;
+package NDWeb::Pages::Points;
 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{points} = __PACKAGE__;
+$NDWeb::Page::PAGES{points} = __PACKAGE__;
 
 
 sub render_body {
@@ -46,7 +46,7 @@ sub render_body {
        $order = 'ASC' if ($type eq 'rank');
 
        my $limit = 'LIMIT 10';
-       $limit = '' if $self->isHC;
+       $limit = '' if $self->isOfficer;
 
        my $query = $DBH->prepare(qq{SELECT username,defense_points,attack_points,scan_points,humor_points
                ,(attack_points+defense_points+scan_points/20) as total_points, rank, count(NULLIF(rc.launched,FALSE)) AS raid_points
@@ -57,11 +57,9 @@ sub render_body {
        $query->execute;
 
        my @members;
-       my $i = 0;
        while (my ($username,$defense,$attack,$scan,$humor,$total,$rank,$raid) = $query->fetchrow){
-               $i++;
                push @members,{Username => $username, Defense => $defense, Attack => $attack, Raid => $raid
-                       , Scan => $scan, Humor => $humor, Total => $total, Rank => $rank, ODD => $i % 2};
+                       , Scan => $scan, Humor => $humor, Total => $total, Rank => $rank};
        }
        $BODY->param(Members => \@members);
        return $BODY;