From 7d750dded7c1d9a587107962887fea321d3d1d95 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 20 Jun 2007 11:52:06 +0000 Subject: [PATCH] getItems() becomes getLimitedItems($offset, $count) --- libraries/List_Database.class.php | 27 +++++++++++++-------------- navigation.php | 18 +++++++++--------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php index 63506fa06..79d61d66c 100644 --- a/libraries/List_Database.class.php +++ b/libraries/List_Database.class.php @@ -50,9 +50,6 @@ require_once './libraries/List.class.php'; */ var $_show_databases_disabled = false; - var $limit_offset = 0; - var $limit_count = 0; - /** * Constructor * @@ -303,13 +300,15 @@ require_once './libraries/List.class.php'; * @uses implode() * @uses strstr() * @uses explode() + * @param integer $offset + * @param integer $count * @return array db list */ - function getGroupedDetails() + function getGroupedDetails($offset, $count) { $dbgroups = array(); $parts = array(); - foreach ($this->getItems() as $key => $db) { + foreach ($this->getLimitedItems($offset, $count) as $key => $db) { // garvin: Get comments from PMA comments table $db_tooltip = ''; if ($GLOBALS['cfg']['ShowTooltip'] @@ -358,14 +357,14 @@ require_once './libraries/List.class.php'; * returns a part of the items * * @uses PMA_List_Database::$items - * @uses PMA_List_Database::$limit_offset - * @uses PMA_List_Database::$limit_count * @uses array_slice() - * @return array the items + * @param integer $offset + * @param integer $count + * @return array some items */ - function getItems() + function getLimitedItems($offset, $count) { - return(array_slice($this->items, $this->limit_offset, $this->limit_count)); + return(array_slice($this->items, $offset, $count)); } /** @@ -373,14 +372,14 @@ require_once './libraries/List.class.php'; * * @return string html code list */ - function getHtmlListGrouped($selected = '') + function getHtmlListGrouped($selected = '', $offset, $count) { if (true === $selected) { $selected = $this->getDefault(); } $return = '