X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=html%2Fdo-edit-scores.pl;h=d70a98c2596896b11c536e7f162994f615e7391c;hb=a317762dab2b775334cc85a43b6fe2e3c2097eab;hp=4c83b7ce538ece6a26a019cbbb8825f83684cf29;hpb=c45d49b7b660344d9b5fddd52fdadd7ccdbc23c4;p=ccbs diff --git a/html/do-edit-scores.pl b/html/do-edit-scores.pl index 4c83b7c..d70a98c 100755 --- a/html/do-edit-scores.pl +++ b/html/do-edit-scores.pl @@ -4,6 +4,8 @@ use ccbs; use strict; use warnings; +ccbs::admin_only(); + my $dbh = ccbs::db_connect(); my $cgi = new CGI; @@ -45,8 +47,8 @@ for my $p ($cgi->param()) { # Fetch the name of the song if we can $ref = $dbh->selectrow_hashref('SELECT title FROM songs WHERE song=?', undef, $cgi->param("song$1-$2")); - ccbs::user_error("Sangen $ref->{'title'} har ikke steps for " . - $cgi->param("playmode$1-$2") . " " . $cgi->param("difficulty$1-$2") . " på ". + ccbs::user_error(_("The song") . $ref->{'title'} . _("doesn't have steps for ") . + $cgi->param("playmode$1-$2") . " " . $cgi->param("difficulty$1-$2") . _(" on "). $tournamentdata->{'machinename'} . "."); } $checked_songs{"$1-$2"} = 1; @@ -55,7 +57,7 @@ for my $p ($cgi->param()) { if ($p =~ /^score(\d+)-(\d+)/) { if (defined($val) && ($val < 0 || $val > 10000)) { - ccbs::user_error("Alle poengsummer må være mellom 0 og 10000 (inklusive)."); + ccbs::user_error(_("All scores must be between 0 and 10000 (inclusive).")); } $dbh->do('UPDATE scores SET score=? WHERE tournament=? AND round=? AND parallel=? AND player=? AND songnumber=?', undef, @@ -72,10 +74,12 @@ for my $p ($cgi->param()) { } } +$dbh->do('UPDATE bigscreen.active_groups SET last_updated=now() WHERE tournament=? AND round=? AND parallel=?', + undef, $tournament, $round, $group); $dbh->do('NOTIFY scores'); $dbh->commit; $dbh->disconnect; -ccbs::print_see_other('show-tournament.pl?id=' . $tournament); +ccbs::print_see_other('show-tournament.pl?id=' . $tournament . '#round' . $round);