From 6b5305d1bff55e66a983d4cbd93b11d6ee6a4fa2 Mon Sep 17 00:00:00 2001
From: Chris Morgan
Date: Fri, 24 Aug 2007 02:10:23 +0000
Subject: [PATCH] Add page selection control at the bottom of pages, without
the items per-page selector. Fix objectMananger::handleMultiPageControls() to
not display the items per-page selector if the $bItemsPerPageSelector input
parameter is false.
---
include/objectManager.php | 49 +++++++++++++++++++++++++--------------
1 file changed, 31 insertions(+), 18 deletions(-)
diff --git a/include/objectManager.php b/include/objectManager.php
index 47852ea..8afe07f 100644
--- a/include/objectManager.php
+++ b/include/objectManager.php
@@ -95,8 +95,8 @@ class ObjectManager
$oObject = new $this->sClass();
- /* Display selectors for items per page and current page, if applicable. The function
- returns FALSE or an array of arguments to be passed to objectGetEntries() */
+ // Display top of the page selectors for items per page and
+ // current page, if applicable.
$this->handleMultiPageControls($aClean, TRUE);
/* query the class for its entries */
@@ -192,6 +192,11 @@ class ObjectManager
echo "
makeUrl("add", false,
"Add $this->sClass")."\">Add entry\n";
}
+
+ // Display bottom of page selectors current page, if applicable
+ // NOTE: second parameter is false because we don't want the
+ // items per page selector appearing for the second set of page controls
+ $this->handleMultiPageControls($aClean, FALSE);
}
/* display the entry for editing */
@@ -704,24 +709,32 @@ class ObjectManager
$iItemsPerPage = $iDefaultPerPage;
- if ( isset($aClean['iItemsPerPage']) && in_array($aClean['iItemsPerPage'], $aItemsPerPage) )
- $iItemsPerPage = $aClean['iItemsPerPage'];
-
- $sControls = "