From 046d70fe607ea88b9a571b417f0f7057e3062fa1 Mon Sep 17 00:00:00 2001 From: Jams H Thompson Date: Sun, 11 Feb 2007 00:24:44 +0000 Subject: pagination fixes --- orphan_pages.php | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) (limited to 'orphan_pages.php') diff --git a/orphan_pages.php b/orphan_pages.php index 9b3bcdc..afa821b 100644 --- a/orphan_pages.php +++ b/orphan_pages.php @@ -1,6 +1,6 @@ assign_by_ref('offset', $offset); @@ -108,24 +108,11 @@ $gBitSmarty->assign('find_last_editor', $find_last_editor); $Content = new BitPage(); $sort_mode = preg_replace( '/^user_/', 'creator_user_', $sort_mode ); $listpages = $Content->getList( $offset, $max_records, $sort_mode, $find, NULL, TRUE, TRUE, FALSE, $find_author, $find_last_editor ); -// If there're more records then assign next_offset -$cant_pages = ceil($listpages["cant"] / $max_records); -$gBitSmarty->assign_by_ref('cant_pages', $cant_pages); -$gBitSmarty->assign_by_ref('pagecount', $listpages['cant']); -$gBitSmarty->assign('actual_page', 1 + ($offset / $max_records)); -if ($listpages["cant"] > ($offset + $max_records)) { - $gBitSmarty->assign('next_offset', $offset + $max_records); -} else { - $gBitSmarty->assign('next_offset', -1); -} -// If offset is > 0 then prev_offset -if ($offset > 0) { - $gBitSmarty->assign('prev_offset', $offset - $max_records); -} else { - $gBitSmarty->assign('prev_offset', -1); -} -$gBitSmarty->assign_by_ref('listpages', $listpages["data"]); -//print_r($listpages["data"]); +$Content->postGetList($listpages); + +$gBitSmarty->assign_by_ref( 'listpages', $listpages["data"] ); +$gBitSmarty->assign_by_ref( 'listInfo', $listpages['listInfo'] ); + // Display the template $gBitSystem->display( 'bitpackage:wiki/orphan_pages.tpl'); -- cgit v1.3