-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
3.3.17
-
phpBB 3.3.17
php 8.5.7
MySQL(i) 8.0.36
If the starting value for pagination is changed in the URL, the correct content of the displayed page is not always shown.
If the 'start' value is set to 2, page 1 is displayed in the pagination. A portion of page 1 and page 2 is displayed in the list.
My modified 'validate_start()' function for 'pagination.php' ensures that the content of the displayed page is always shown.
public function validate_start(int $start, int $per_page, int $num_items): int |
{
|
$start = $start >= $num_items ? $num_items - 1 : $start; |
$start = intdiv($start, $per_page) * $per_page;
|
$start = max(0, $start); |
return $start; |
}
|

