From 5f201b31d1ed259f7eec068794b477f886a77bcb Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Sat, 7 Aug 2010 01:57:39 +0200 Subject: [PATCH] Remove attack groups --- lib/NDWeb/Controller/Members.pm | 23 ----------------------- root/src/members/index.tt2 | 11 ----------- 2 files changed, 34 deletions(-) diff --git a/lib/NDWeb/Controller/Members.pm b/lib/NDWeb/Controller/Members.pm index 0751b40..8c7f6cb 100644 --- a/lib/NDWeb/Controller/Members.pm +++ b/lib/NDWeb/Controller/Members.pm @@ -83,12 +83,6 @@ ORDER BY landing_tick DESC }); $announcements->execute($c->user->id); $c->stash(announcements => $announcements->fetchall_arrayref({}) ); - - my ($attackgroups) = $dbh->selectrow_array(q{ -SELECT array_agg(gid) FROM groupmembers WHERE gid IN ('x','y','z') AND uid = $1 - }, undef, $c->user->id); - $c->stash(attackgroups => $attackgroups); - } sub posthostupdate : Local { @@ -101,23 +95,6 @@ sub posthostupdate : Local { $c->res->redirect($c->uri_for('')); } -sub postattackgroups : Local { - my ( $self, $c ) = @_; - my $dbh = $c->model; - - my @groups = $c->req->param('class'); - $dbh->do(q{DELETE FROM groupmembers WHERE gid IN ('x','y','z') AND gid <> ALL($1) AND uid = $2 - },undef, \@groups, $c->user->id); - - $dbh->do(q{INSERT INTO groupmembers (uid,gid) ( - SELECT $2, gid FROM unnest($1::text[]) AS gid WHERE gid IN ('x','y','z') - EXCEPT - SELECT uid,gid FROM groupmembers WHERE uid = $2 - )},undef, \@groups, $c->user->id); - - $c->res->redirect($c->uri_for('')); -} - sub postsmsupdate : Local { my ( $self, $c ) = @_; my $dbh = $c->model; diff --git a/root/src/members/index.tt2 b/root/src/members/index.tt2 index a2ef6fb..6f4b226 100644 --- a/root/src/members/index.tt2 +++ b/root/src/members/index.tt2 @@ -119,17 +119,6 @@

-
Attack classes -
-

Pick the classes you use for your attack fleets:

-

-FiCo: 0 %] checked[%END%]> -FrDe: 0 %] checked[%END%]> -CrBs: 0 %] checked[%END%]> - -

-
-
Hostname

Hostname: -- 2.39.2