From d96bb3a86e4a78ec4f1753f87d9dd0411f8da896 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Mon, 25 Aug 2003 01:38:49 +0000 Subject: 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 --- phpBB/includes/functions.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/functions.php') 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) ? '' . $total_pages . '' : '' . $total_pages . '  ' . $user->lang['NEXT'] . ''; +// $page_string = '' . $user->lang['GOTO_PAGE'] . ' ' . $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 -- cgit v1.2.1