X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=NDWeb%2FPages%2FCovOp.pm;h=4654eee0d47f911f24969c569f2bea8be501dec6;hb=34876053e79ee0153b38c8cad7c9404322472f29;hp=e777499e03c552dc96a033a9818ee7866c8adf0f;hpb=19c3f07640411d28236abc9d4d8045f17cc8a12d;p=ndwebbie.git diff --git a/NDWeb/Pages/CovOp.pm b/NDWeb/Pages/CovOp.pm index e777499..4654eee 100644 --- a/NDWeb/Pages/CovOp.pm +++ b/NDWeb/Pages/CovOp.pm @@ -40,9 +40,9 @@ sub render_body { $self->{TITLE} = 'CovOp Targets'; my $DBH = $self->{DBH}; - return $self->noAccess unless $self->isHC; + return $self->noAccess unless $self->isMember; - my $show = q{AND ((planet_status IS NULL OR NOT planet_status IN ('Friendly','NAP')) AND (relationship IS NULL OR NOT relationship IN ('Friendly','NAP')))}; + my $show = q{AND (NOT planet_status IN ('Friendly','NAP')) AND (NOT relationship IN ('Friendly','NAP'))}; $show = '' if defined param('show') && param('show') eq 'all'; if (defined param('covop') && param('covop') =~ /^(\d+)$/){ my $update = $DBH->prepare('UPDATE covop_targets SET covop_by = ?, last_covop = tick() WHERE planet = ? '); @@ -79,12 +79,10 @@ sub render_body { $query->execute($self->{PLANET}); my @targets; - my $i = 0; while (my ($id,$coords,$metal,$crystal,$eonium,$seccents,$dists,$max) = $query->fetchrow){ - $i++; push @targets,{Target => $id, Coords => $coords , Metal => $metal, Crystal => $crystal, Eonium => $eonium, SecCents => $seccents - , Dists => $dists, MaxResHack => $max, List => $list, ODD => $i % 2}; + , Dists => $dists, MaxResHack => $max, List => $list}; } $BODY->param(Targets => \@targets); return $BODY;