]> ruin.nu Git - ndwebbie.git/commitdiff
fatal warnings and possible to comment targets again
authorMichael Andreen <harv@ruin.nu>
Fri, 29 Dec 2006 15:15:12 +0000 (15:15 +0000)
committerMichael Andreen <harv@ruin.nu>
Fri, 29 Dec 2006 15:15:12 +0000 (15:15 +0000)
ND/Include.pm
editRaid.pl

index 96f64da1e5eee58d5cec4b751ce201f51b51fc5e..796ed68dbd10acabcc81244d97d295d335044e20 100644 (file)
@@ -99,6 +99,7 @@ ORDER BY r.tick+c.wave,x,y,z});
 sub alliances {
        my ($alliance) = @_;
        my @alliances;
 sub alliances {
        my ($alliance) = @_;
        my @alliances;
+       $alliance = -1 unless defined $alliance;
        push @alliances,{Id => -1, Name => '&nbsp;', Selected => not $alliance};
        my $query = $ND::DBH->prepare(q{SELECT id,name FROM alliances ORDER BY name});
        $query->execute;        
        push @alliances,{Id => -1, Name => '&nbsp;', Selected => not $alliance};
        my $query = $ND::DBH->prepare(q{SELECT id,name FROM alliances ORDER BY name});
        $query->execute;        
index fd109320880459d6edab93e7740f5b1c3be9bae0..a1de374e59b81b597583d536b882b07c81b035fc 100644 (file)
@@ -18,6 +18,8 @@
 #**************************************************************************/
 
 use strict;
 #**************************************************************************/
 
 use strict;
+use warnings FATAL => 'all';
+no warnings qw(uninitialized);
 use POSIX;
 our $BODY;
 our $DBH;
 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;
                }
                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'));
        }elsif (param('cmd') eq 'change'){
                $DBH->begin_work;
                my $message = escapeHTML(param('message'));