X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=users.pl;h=20687a5ca4efad6f794b01de4a25c5ea2e42deb8;hb=e9725f0f2d11e349e3f3db752b46929a80a03c1d;hp=62988081baf3acade7dcf0d020b98ea26b11096e;hpb=bea57618abafc540d48753f78400a6d0e4cde3f1;p=ndwebbie.git diff --git a/users.pl b/users.pl index 6298808..20687a5 100644 --- a/users.pl +++ b/users.pl @@ -18,6 +18,8 @@ #**************************************************************************/ use strict; +use warnings FATAL => 'all'; +no warnings qw(uninitialized); use POSIX; our $BODY; our $DBH; @@ -34,10 +36,11 @@ if (param('user') =~ /^(\d+)$/){ SELECT uid,username,hostmask,coords(x,y,z) AS planet,attack_points,defense_points,scan_points,humor_points FROM users u LEFT OUTER JOIN current_planet_stats p ON u.planet = p.id WHERE uid = ?; -}) or $error .= "

Something went wrong: ".$DBH->errstr."

"; +}) or $error .= "

Something went wrong:

"; $user = $DBH->selectrow_hashref($query,undef,$1) or $error.= "

Something went wrong: ".$DBH->errstr."

"; } + if ($user && param('cmd') eq 'change'){ $DBH->begin_work; for my $param (param()){ @@ -68,6 +71,7 @@ if ($user && param('cmd') eq 'change'){ $groups->execute(); while (my $group = $groups->fetchrow_hashref){ my $query; + next unless defined param($group->{gid}); if (param($group->{gid}) eq 'remove'){ $query = $delgroup; }elsif(param($group->{gid}) eq 'add'){