projectblacklight/blacklight — pull request #528 by steffengodskesen (2013-02-13 09:56:14+00:00)
Title: Reset "page" param on "per_page" change

Example:

Go to: http://demo.projectblacklight.org/?f%5Bformat%5D%5B%5D=Unknown&per_page=10
Change to page 2: http://demo.projectblacklight.org/?f%5Bformat%5D%5B%5D=Unknown&page=2&per_page=10
Change "per_page" to 100: http://demo.projectblacklight.org/?f%5Bformat%5D%5B%5D=Unknown&page=2&per_page=100

Now you're stuck on results "101 - 100 of 88" with a blank page and no next/prev links.

Our solution: When the "per_page" param is changed, reset the "page" param to 1,
to avoid paging outside the actual number of documents. Also disable
the link for selecting the "per_page" value that is currently active.