X-Git-Url: https://git.sesse.net/?p=ccbs;a=blobdiff_plain;f=html%2Fdo-edit-scores.pl;fp=html%2Fdo-edit-scores.pl;h=8b28303e6162fff4238da4898075f399d6f38ea1;hp=fe29c168abe76ddc895101fa02f0e67aaec502bc;hb=ed77839b314639904743a85ff4ea4c5079102464;hpb=9e9977d8d73f4f28e6f8f3d6d1a007a859bc3955 diff --git a/html/do-edit-scores.pl b/html/do-edit-scores.pl index fe29c16..8b28303 100755 --- a/html/do-edit-scores.pl +++ b/html/do-edit-scores.pl @@ -20,9 +20,12 @@ for my $p ($cgi->param()) { next unless (defined($cgi->param('old-' . $p))); next if ($cgi->param($p) eq $cgi->param('old-' . $p)); + my $val = $cgi->param($p); + undef $val if ($val =~ /^\s*$/); + if ($p =~ /^score(\d+)-(\d+)/) { $dbh->do('UPDATE scores SET score=? WHERE tournament=? AND round=? AND parallel=? AND player=? AND songnumber=?', undef, - $cgi->param($p), $tournament, $round, $group, $1, $2); + $val, $tournament, $round, $group, $1, $2); } }