]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Controller/Members.pm
Remove attack groups
[ndwebbie.git] / lib / NDWeb / Controller / Members.pm
index 0751b4040979fc992e90bc0ed6bc2650589a9307..8c7f6cbb4c981fee2cf2edd40ab41aa20181b22b 100644 (file)
@@ -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;