]> iEval git - gruntmaster-page.git/commitdiff
Fix problem entry during contest
authorMarius Gavrilescu <marius@ieval.ro>
Mon, 1 Dec 2014 13:22:48 +0000 (15:22 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Mon, 1 Dec 2014 13:22:48 +0000 (15:22 +0200)
lib/Plack/App/Gruntmaster.pm

index f647783e61ac9d1b7ad4c8c7eafb98af6df3ff07..3e37ef12996dca805965d8509596847418c4eb38 100644 (file)
@@ -153,7 +153,9 @@ sub dispatch_request{
                sub (/us/:user)    { response us_entry => user->name, db->user_entry($_{user}) },
                sub (/ct/:contest) { response ct_entry => contest->name, db->contest_entry($_{contest}) },
                sub (/log/:job)    { response log_entry => "Job  $_{job}", db->job_entry($_{job}) },
-               sub (/pb/:problem + ?:contest~) {
+               sub (/pb/:problem + ?contest~) {
+                       my (undef, undef, $contest) = @_;
+                       $_{contest} = $contest;
                        return NOT_FOUND if !contest && !problem->is_in_archive || contest && !db->contest_problems->find($_{contest}, $_{problem});
                        forbid problem->is_private;
                        response pb_entry => problem->name, db->problem_entry($_{problem}, $_{contest}, remote_user && remote_user->id);
This page took 0.027067 seconds and 4 git commands to generate.