X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=html%2Fdo-add-tournament.pl;h=57df3742460ad235d640c2c1223ce3ae5bea6d2a;hb=a317762dab2b775334cc85a43b6fe2e3c2097eab;hp=ddacad5c8677b34a9ad6ed88d517bb2424a6d09d;hpb=ed24825456ae9c1621b3ccc4d2b2c6a8ed343b4e;p=ccbs diff --git a/html/do-add-tournament.pl b/html/do-add-tournament.pl index ddacad5..57df374 100755 --- a/html/do-add-tournament.pl +++ b/html/do-add-tournament.pl @@ -4,6 +4,8 @@ use ccbs; use strict; use warnings; +ccbs::admin_only(); + my $dbh = ccbs::db_connect(); my $cgi = new CGI; @@ -16,13 +18,13 @@ my $machine = $cgi->param('machine'); my $scoringsystem = $cgi->param('scoringsystem'); if ($date !~ /^ ( \d{4} - \d\d - \d\d ) $/x) { - die "Ugyldig dato (må være på YYYY-MM-DD)"; + ccbs::user_error(_("Invalid date (must be of the form YYYY-MM-DD)")); } $dbh->do('INSERT INTO tournaments (season, tournamentname, country, location, date, machine, scoringsystem) VALUES (?,?,?,?,?,?,?)', undef, $season, $name, $country, $place, $date, $machine, $scoringsystem); ccbs::print_header(); -ccbs::process_template('do-add-tournament.tmpl', 'Legg til turnering', {}); +ccbs::process_template('do-add-tournament.tmpl', _('Add tournament'), {}); $dbh->disconnect;