From 3c53f79540e4015db087fd0bfb9b1af9baef1294 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 6 Feb 2014 14:38:36 +0200 Subject: [PATCH] Fix incorrect usage of $Gruntmaster::Data::contest --- lib/Gruntmaster/Page/Log/Entry.pm | 2 +- lib/Gruntmaster/Page/Submit.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, -- 2.39.2