aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_display.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r--phpBB/includes/functions_display.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 01f694afd1..251a7b9f0d 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -567,9 +567,11 @@ function topic_generate_pagination($replies, $url)
for ($j = 0; $j < $replies + 1; $j += $per_page)
{
$pagination .= '<a href="' . $url . '&amp;start=' . $j . '">' . $times . '</a>';
- if ($times == 1 && $total_pages > 4)
+ if ($times == 1 && $total_pages > 5)
{
$pagination .= ' ... ';
+
+ // Display the last three pages
$times = $total_pages - 3;
$j += ($total_pages - 4) * $per_page;
}