X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FSubmit.pm;h=0159a9d06865f7a3f1132324e171bf310a4c748a;hb=95a9ad1be9a7e32f642d469acb006990c2b86151;hp=096af4d81a2e9092a545e73a13b34c7c36b1d730;hpb=8d29b3b10314c58d01fe2ce7e69865d04525406d;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Submit.pm b/lib/Gruntmaster/Page/Submit.pm index 096af4d..0159a9d 100644 --- a/lib/Gruntmaster/Page/Submit.pm +++ b/lib/Gruntmaster/Page/Submit.pm @@ -27,14 +27,14 @@ sub generate{ my ($problem, $format, $contest, $private, $prog) = map {scalar $r->param($_)} 'problem', 'prog_format', 'contest', 'private', 'source_code'; my $upload = $r->upload('prog'); if (defined $upload) { - my $temp = read_file $upload->filename; + my $temp = read_file $upload->path; $prog = $temp if $temp } die if defined $contest && $contest !~ /^\w+$/ ; 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,