Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PagerAwareViewData shows to many pages #246

Open
11mb opened this issue Nov 23, 2017 · 1 comment
Open

PagerAwareViewData shows to many pages #246

11mb opened this issue Nov 23, 2017 · 1 comment

Comments

@11mb
Copy link

11mb commented Nov 23, 2017

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

@JanTvrdik
Copy link

#245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants