aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-06-09 21:09:00 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-06-09 21:09:00 +0000
commit118ff9ad24ee32286f186a2b53cf55d15fa3fccf (patch)
treebb97a78787bef297e8bb054c2901840b5cda2fb9 /phpBB/includes
parentbf8b7659a918b15cf8ccb42c23aadc446df52542 (diff)
downloadforums-118ff9ad24ee32286f186a2b53cf55d15fa3fccf.tar
forums-118ff9ad24ee32286f186a2b53cf55d15fa3fccf.tar.gz
forums-118ff9ad24ee32286f186a2b53cf55d15fa3fccf.tar.bz2
forums-118ff9ad24ee32286f186a2b53cf55d15fa3fccf.tar.xz
forums-118ff9ad24ee32286f186a2b53cf55d15fa3fccf.zip
Likely fix for pagination failure on div 10 boundary
git-svn-id: file:///svn/phpbb/trunk@446 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 2a1645a5e0..255fccd56f 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -380,15 +380,24 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
if($this_block_end < $total_pages)
{
$page_string_append = ", ";
- for($i = $this_block_end + 1; $i < $total_pages; $i+=10)
+
+ if(!($total_pages%10))
+ {
+ $page_url = append_sid($base_url."&start=".( ( ($this_block_end + 1) * $per_page ) - $per_page ) );
+ $page_string_append .= "<a href=\"$page_url\">$total_pages</a>";
+ }
+ else
{
- $page_string_append .= "<a href=\"".append_sid($base_url."&start=".(($i*$per_page) - $per_page))."\">" . ( ($i == 0) ? ($i+1) : $i) . " - " . ((($i+9) < $total_pages) ? ($i+9) : $total_pages) ."</a>";
- if($i < $total_pages - 10)
+
+ for($i = $this_block_end + 1; $i < $total_pages; $i+=10)
{
- $page_string_append .= ", ";
+ $page_string_append .= "<a href=\"".append_sid($base_url."&start=".(($i*$per_page) - $per_page))."\">" . ( ($i == 0) ? ($i+1) : $i) . " - " . ((($i+9) < $total_pages) ? ($i+9) : $total_pages) ."</a>";
+ if($i < $total_pages - 10)
+ {
+ $page_string_append .= ", ";
+ }
}
}
-
$page_string .= $page_string_append;
}