From: Michael Andreen Date: Fri, 29 Dec 2006 15:15:12 +0000 (+0000) Subject: fatal warnings and possible to comment targets again X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;ds=inline;h=49477962790fe1b056d500783d36b6bcb5dd0707;p=ndwebbie.git fatal warnings and possible to comment targets again --- diff --git a/ND/Include.pm b/ND/Include.pm index 96f64da..796ed68 100644 --- a/ND/Include.pm +++ b/ND/Include.pm @@ -99,6 +99,7 @@ ORDER BY r.tick+c.wave,x,y,z}); sub alliances { my ($alliance) = @_; my @alliances; + $alliance = -1 unless defined $alliance; push @alliances,{Id => -1, Name => ' ', Selected => not $alliance}; my $query = $ND::DBH->prepare(q{SELECT id,name FROM alliances ORDER BY name}); $query->execute; diff --git a/editRaid.pl b/editRaid.pl index fd10932..a1de374 100644 --- a/editRaid.pl +++ b/editRaid.pl @@ -18,6 +18,8 @@ #**************************************************************************/ use strict; +use warnings FATAL => 'all'; +no warnings qw(uninitialized); use POSIX; our $BODY; our $DBH; @@ -67,6 +69,11 @@ if ($raid){ if($DBH->do(q{UPDATE raids SET released_coords = FALSE WHERE id = ?},undef,$raid->{id})){ $raid->{released_coords} = 0; } + }elsif (param('cmd') eq 'comment'){ + $DBH->do(q{UPDATE raid_targets SET comment = ? WHERE id = ?} + ,undef,escapeHTML(param('comment')),param('target')) + or $error .= p($DBH->errstr); + }elsif (param('cmd') eq 'change'){ $DBH->begin_work; my $message = escapeHTML(param('message'));