From: Marius Gavrilescu Date: Thu, 6 Feb 2014 12:38:36 +0000 (+0200) Subject: Fix incorrect usage of $Gruntmaster::Data::contest X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=3c53f79540e4015db087fd0bfb9b1af9baef1294;p=plack-app-gruntmaster.git Fix incorrect usage of $Gruntmaster::Data::contest --- diff --git a/lib/Gruntmaster/Page/Log/Entry.pm b/lib/Gruntmaster/Page/Log/Entry.pm index af9e1db..8864df8 100644 --- a/lib/Gruntmaster/Page/Log/Entry.pm +++ b/lib/Gruntmaster/Page/Log/Entry.pm @@ -26,7 +26,7 @@ HTML sub _generate{ my ($self, $htc, $lang, $env, $ct, $id) = @_; debug $env => "language is '$lang', contest is '$ct' and id is '$id'"; - local $Gruntmaster::Data::contest = $ct; + local $Gruntmaster::Data::contest = $ct if $ct; my @tests = (); diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index 096af4d..b08399e 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -34,7 +34,7 @@ sub generate{ die if defined $contest && (time > contest_end $contest); return reply 'A required parameter was not supplied' if grep { !defined } $problem, $format, $prog; - local $Gruntmaster::Data::contest = $contest; + local $Gruntmaster::Data::contest = $contest if $contest; my $job = push_job ( date => time,