fixed: paginator doesn't show correct number of page links with a limit applied

This commit is contained in:
Graham Knop 2008-08-07 22:55:41 +00:00
parent f082e2d14e
commit c3e1d798b9
2 changed files with 2 additions and 1 deletions

View file

@ -1,4 +1,5 @@
7.5.19
- fixed: paginator doesn't show correct number of page links with a limit applied
- fixed: user profile defaults can contain arbitrary perl code
- fixed: Syndicated Content UTF-8 check for decoded content
- fixed: unable to purge trash

View file

@ -492,8 +492,8 @@ sub getPageLinks {
my $output;
my $i = 1;
my $minPage = $self->getPageNumber - round($limit/2);
my $maxPage = $minPage + $limit;
my $start = ($minPage > 0) ? $minPage : 1;
my $maxPage = $start + $limit - 1;
my $end = ($maxPage < $self->getPageNumber) ? $self->getPageNumber : $maxPage;
my @temp;
foreach my $page (@pages) {