X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FLog.pm;h=c9d0dfb60834a277e9b6ff58071ce6a68d2fc64c;hb=e9e5c8a440a6e3a088a4b9330650e310561ef518;hp=2379e804815c816f81cae63081b441bee514569a;hpb=b83e43dc480771137fcff41589815556881b1243;p=plack-app-gruntmaster.git diff --git a/lib/Gruntmaster/Page/Log.pm b/lib/Gruntmaster/Page/Log.pm index 2379e80..c9d0dfb 100644 --- a/lib/Gruntmaster/Page/Log.pm +++ b/lib/Gruntmaster/Page/Log.pm @@ -34,6 +34,7 @@ sub _generate{ $path =~ m,^(?:ct/([^/]+)/)?log/(\w+)\.html$,; local $Gruntmaster::Data::contest = $1 if $1; my $pages = POSIX::floor (jobcard / PAGE_SIZE); + $pages ||= 1; my $page = $2 eq 'index' ? $pages : $2; my @log = sort { $b->{id} <=> $a->{id} } map +{