aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-08-25 01:38:49 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-08-25 01:38:49 +0000
commitd96bb3a86e4a78ec4f1753f87d9dd0411f8da896 (patch)
tree807e990e138728b80e2fde4484ad67b226c40dc9 /phpBB/includes/functions.php
parentfb5a64a31959aab27262c56f5fdbd6e5b231fa9c (diff)
downloadforums-d96bb3a86e4a78ec4f1753f87d9dd0411f8da896.tar
forums-d96bb3a86e4a78ec4f1753f87d9dd0411f8da896.tar.gz
forums-d96bb3a86e4a78ec4f1753f87d9dd0411f8da896.tar.bz2
forums-d96bb3a86e4a78ec4f1753f87d9dd0411f8da896.tar.xz
forums-d96bb3a86e4a78ec4f1753f87d9dd0411f8da896.zip
A few more changes ... nearly there ... deleting users is going to be a little troublesome
git-svn-id: file:///svn/phpbb/trunk@4430 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 3f9709ba42..57282981ba 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -650,13 +650,13 @@ function markread($mode, $forum_id = 0, $topic_id = 0, $marktime = false)
// Pagination routine, generates page number sequence
function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE)
{
- global $user;
+ global $template, $user;
$total_pages = ceil($num_items/$per_page);
if ($total_pages == 1 || !$num_items)
{
- return '';
+ return false;
}
$on_page = floor($start_item / $per_page) + 1;
@@ -697,16 +697,23 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
$page_string .= ($on_page == $total_pages) ? '<b>' . $total_pages . '</b>' : '<a href="' . $base_url . '&amp;start=' . (($total_pages - 1) * $per_page) . '">' . $total_pages . '</a>&nbsp;&nbsp;<a href="' . $base_url . "&amp;start=" . ($on_page * $per_page) . '">' . $user->lang['NEXT'] . '</a>';
+// $page_string = '<a href="javascript:goto();">' . $user->lang['GOTO_PAGE'] . '</a> ' . $page_string;
$page_string = $user->lang['GOTO_PAGE'] . ' ' . $page_string;
+// $template->assign_var('BASE_URL', $base_url);
+
return $page_string;
}
function on_page($num_items, $per_page, $start)
{
- global $user;
+ global $template, $user;
+
+ $on_page = floor($start / $per_page) + 1;
+
+// $template->assign_var('ON_PAGE', $on_page);
- return sprintf($user->lang['PAGE_OF'], floor($start / $per_page) + 1, max(ceil($num_items / $per_page), 1));
+ return sprintf($user->lang['PAGE_OF'], $on_page, max(ceil($num_items / $per_page), 1));
}
// Obtain list of naughty words and build preg style replacement arrays for use by the