Skip to content

PagerAwareViewData shows to many pages #246

Open
@11mb

Description

@11mb

When using the pager filter I noticed I get to many pages: 20 instead of only 6 available. When I look into the code the last page is being calculated with this formula:

$end = $begin + $this->maxPages - 2;

This formula can never be correct as the maxPages variable has little to do with the $end when $this->numPages is lower then maxPages.

By viewing the code it seems that the author also realized this, since a whole block of code that deals with this problem is written but commented out: https://github.com/ongr-io/FilterManagerBundle/blob/master/Filter/ViewData/PagerAwareViewData.php#L187

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions