X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FPb%2FEntry.pm;h=c9dfe206b3f8aacd080c6fc5a2817088e6dca562;hb=879063d7deb100035d21ff2be57dce8d090b431f;hp=ebcf56eca506752b8cee8631a0c615d9defdc196;hpb=cd9af27e94244e6454c3db787a8ca6811f44fc16;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Pb/Entry.pm b/lib/Gruntmaster/Page/Pb/Entry.pm index ebcf56e..c9dfe20 100644 --- a/lib/Gruntmaster/Page/Pb/Entry.pm +++ b/lib/Gruntmaster/Page/Pb/Entry.pm @@ -43,7 +43,7 @@ $templates{$_} = header($_, TITLE) . $templates{$_} for keys %templates; $templates{$_} .= footer $_ for keys %templates; sub generate{ - $_[0] =~ m,(?:ct/([^/])+/)?log/(\w+)\.html$,; + $_[0] =~ m,(?:ct/([^/])+/)?pb/(\w+)\.html$,; my ($contest, $id) = ($1, $2); my $htc = HTML::Template::Compiled->new(scalarref => \$templates{$_[1]}); @@ -55,9 +55,9 @@ sub generate{ } $htc->param(formats => FORMATS); $htc->param(id => $id); - local $Gruntmaster::Data::contest = ($_[0] =~ m,(?:ct/([^/])+/)?,)[0]; + local $Gruntmaster::Data::contest = $contest if $contest; $htc->param(name => problem_name $id); - $htc->param(statement => problem_statement $id, $_[2]); + $htc->param(statement => problem_statement $id); $htc->output }