The "edit scores" backend now finds out which update button was pressed.
authorSteinar H. Gunderson <sesse@samfundet.no>
Wed, 16 Feb 2005 14:10:57 +0000 (14:10 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Wed, 16 Feb 2005 14:10:57 +0000 (14:10 +0000)
html/do-edit-scores.pl

index 997d9659be23eaf5582237b44007c31b6b509ff8..4b5d4828034597a8f2fe487ec1beb755a928d2ce 100755 (executable)
@@ -9,6 +9,17 @@ my $cgi = new CGI;
 
 my $tournament = $cgi->param('tournament');
 
 
 my $tournament = $cgi->param('tournament');
 
+# Loop through all parameters until we find the update button
+my $player;
+for my $param ($cgi->param()) {
+       if ($param =~ /^update(\d+)$/) {
+               $player = $1;
+               last;
+       }
+}
+
+die "Form-submit uten å trykke på noen update-knapp?" unless (defined($player));
+
 $dbh->disconnect;
 
 ccbs::print_see_other('show-tournament.pl?id=' . $tournament);
 $dbh->disconnect;
 
 ccbs::print_see_other('show-tournament.pl?id=' . $tournament);