better pagination

If you add this code to:

/core/fn.common.php

at line 447:



```php

if ($page <= $deviation || (($total_pages-$page) <= $deviation && $back_page = true)) {

$diff = (!$back_page) ? $deviation - $page : $deviation - ($total_pages-$page);

$deviation += $diff + 1;

}

```





It will make the pagination nicer. I don’t like how it shows x pages to the left or right. If you are on the first page, it only shows x to the right, and the number of pages shown grows until there are x on the left and right. This takes care of it.



Suppose x is 3, when you are on the first page, it changes x to 6, then on the second page it changes x to 5, then 4, then 3. It stays at 3 until the end when it increases as you get closer to the edge.

Very simple, would be nice if they added it.





edit: it would also be nice if it went:

[1] […] [4] [5] [6] [7] [8] […] [43]

That’s more of a request, I could add it, but ehh. It’s nice to know the total number of pages and be able to jump there fast. It would need some logic to not put it there when close enough to either edge. But I guess it could be added to whatever puts the […] there in the first place.