]> git.sesse.net Git - ccbs/blobdiff - html/show-tournament.pl
Change to text/html (for IE demonstration)
[ccbs] / html / show-tournament.pl
index 230621bba7294f51edd67df4efc7689fce82a906..89ba78d8d5bc84882c101f1ab23f6f2f31fceb34 100755 (executable)
@@ -71,6 +71,9 @@ for my $score (@$scores) {
        }
 }
 
+# FIXME: In some odd cases, there _might_ be an empty group right at the end. Fix this when
+#        we are able to add/delete people in groups.
+
 my $num_rounds = scalar @rounds;
 my $num_rankings = scalar @$rankings;
 
@@ -96,6 +99,14 @@ if ($num_rounds == 0) {
        $num_qualified = $ref->{'numqualifying'};
 }
 
+# And last: If there is a ranking list, the tournament is closed and we really can't
+# do anything more
+if ($num_rankings > 0) {
+       $closing_valid = 0;
+       $finishing_valid = 0;
+       $rounds[$#rounds]->{'locked'} = 1;
+}
+
 ccbs::print_header();
 ccbs::process_template('show-tournament.tmpl', $tournament->{'tournamentname'}, {
        tournament => $tournament,