]> iEval git - gruntmaster-page.git/blobdiff - lib/Plack/App/Gruntmaster.pm
Serve lisp as text/plain
[gruntmaster-page.git] / lib / Plack / App / Gruntmaster.pm
index 6bc1f79eccc2a3179300a2f60e4856bf1cf9f25b..0bc46445e1f2ca0f7a491767090a65456cb8c652 100644 (file)
@@ -34,6 +34,7 @@ use constant CONTENT_TYPES => +{
        pas => 'text/x-pascal',
        pl => 'text/x-perl',
        py => 'text/x-python',
+       l => 'text/plain',
 };
 
 use constant FORMAT_EXTENSION => {
@@ -47,6 +48,7 @@ use constant FORMAT_EXTENSION => {
        PASCAL => 'pas',
        PERL => 'pl',
        PYTHON => 'py',
+       SBCL => 'l',
 };
 
 use constant NOT_FOUND => [404, ['Content-Type' => 'text/plain'], ['Not found']];
@@ -244,6 +246,7 @@ sub dispatch_request{
                        my $source = $prog ? read_file $prog->path : $_{source_code};
                        unlink $prog->path if $prog;
                        my $private = (problem->private && !$_{contest}) ? 1 : 0;
+                       $private = 1 if contest && contest->is_pending;
                        my $newjob = db->jobs->create({
                                maybe contest => $_{contest},
                                private => $private,
This page took 0.021975 seconds and 4 git commands to generate.