X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster.pm;h=f091892c75364acab62bec77a11defab31818a61;hb=29de778ba60e4c2b499b417e0dfa4317d54c5d57;hp=1a0c7ab3946180379c607e6bcac81666df626f9e;hpb=be6551aa39afa16aeea55d8073d6c4039aaf7f5d;p=gruntmaster-page.git diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 1a0c7ab..f091892 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -240,9 +240,10 @@ sub dispatch_request{ my $source = $prog ? read_file $prog->path : $_{source_code}; unlink $prog->path if $prog; + my $private = (problem->private && !$_{contest}) ? 1 : 0; my $newjob = db->jobs->create({ maybe contest => $_{contest}, - maybe private => problem->private && !$_{contest}, + private => $private, date => time, extension => FORMAT_EXTENSION->{$_{prog_format}}, format => $_{prog_format},