diff options
Diffstat (limited to 'phpBB/phpbb/pagination.php')
-rw-r--r-- | phpBB/phpbb/pagination.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/phpbb/pagination.php b/phpBB/phpbb/pagination.php index 927d711f4b..8aba41d651 100644 --- a/phpBB/phpbb/pagination.php +++ b/phpBB/phpbb/pagination.php @@ -46,7 +46,7 @@ class pagination * If you use page numbers inside your controller route, start name should be the string * that should be removed for the first page (example: /page/%d) * @param int $per_page the number of items, posts, etc. to display per page, used to determine the number of pages to produce - * @return URL for the requested page + * @return string URL for the requested page */ protected function generate_page_link($base_url, $on_page, $start_name, $per_page) { @@ -126,8 +126,8 @@ class pagination // determine this number. Again at most five pages? Then just display them all. More than // five and we first (min) determine whether we'd end up listing more pages than exist. // We then (max) ensure we're displaying the minimum number of pages. - $start_page = ($total_pages > 5) ? min(max(1, $on_page - 3), $total_pages - 4) : 1; - $end_page = ($total_pages > 5) ? max(min($total_pages, $on_page + 3), 5) : $total_pages; + $start_page = ($total_pages > 5) ? min(max(1, $on_page - 2), $total_pages - 4) : 1; + $end_page = ($total_pages > 5) ? max(min($total_pages, $on_page + 2), 5) : $total_pages; } if ($on_page != 1) |