X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=lib%2FNDWeb%2FController%2FRoot.pm;h=787850019a9929d1fb17a2d3fe9d4088ce5dda3e;hb=48df392b0817ea813443309eecc5949550095155;hp=29a0cbcb1a665a029c2709cbc07d84609eedf465;hpb=fad7141dbbfb2d235f8cadd98d96cbed9b7c4be6;p=ndwebbie.git diff --git a/lib/NDWeb/Controller/Root.pm b/lib/NDWeb/Controller/Root.pm index 29a0cbc..7878500 100644 --- a/lib/NDWeb/Controller/Root.pm +++ b/lib/NDWeb/Controller/Root.pm @@ -129,8 +129,8 @@ sub listTargets : Private { my $dbh = $c ->model; - my $query = $dbh->prepare(q{SELECT t.id, r.id AS raid, r.tick+c.wave-1 AS landingtick, - (released_coords AND old_claim(timestamp)) AS released_coords, coords(x,y,z),c.launched,c.wave,c.joinable + my $query = $dbh->prepare(q{SELECT t.id, r.id AS raid, r.tick+c.wave-1 AS landingtick, + released_coords, coords(x,y,z),c.launched,c.wave,c.joinable FROM raid_claims c JOIN raid_targets t ON c.target = t.id JOIN raids r ON t.raid = r.id @@ -220,6 +220,10 @@ sub end : ActionClass('RenderView') { $c->stash->{template} = 'access_denied.tt2'; $c->res->status(403); $c->clear_errors; + }elsif ($c->error->[0] =~ m/No logged in user, and none supplied as argument/){ + $c->stash->{template} = 'access_denied.tt2'; + $c->res->status(403); + $c->clear_errors; } } @@ -243,10 +247,7 @@ AND mission = 'Full fleet' AND name IN ('Main','Advanced Unit'); newposts => $newposts, unreadposts => $unread }); - $c->stash->{user}->{attacker} = $c->check_user_roles(qw/attack_menu/) - && (!$c->check_user_roles(qw/member_menu/) - || ($c->user->planet && (($c->stash->{TICK} - $fleetupdate < 24) - || $c->check_user_roles(qw/no_fleet_update/)))), + $c->stash->{user}->{attacker} = $c->check_user_roles(qw/attack_menu/); $c->forward('listTargets'); } my $birthdays = $dbh->prepare(q{SELECT username