X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FGruntmaster%2FPage%2FLog.pm;h=c9d0dfb60834a277e9b6ff58071ce6a68d2fc64c;hb=b9d003fd060ca4af99273a8d2915bfd7de5cb14c;hp=2379e804815c816f81cae63081b441bee514569a;hpb=e0f96c91c9a2336893b36a11142e0a55fd3c9851;p=gruntmaster-page.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 +{