From f1cf062710ae5fba098b2775949a083f7457e82b Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 9 Mar 2006 07:13:18 +0000 Subject: changed default current page index to -1, modified itemAt($index) --- framework/Collections/TPagedList.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'framework/Collections') diff --git a/framework/Collections/TPagedList.php b/framework/Collections/TPagedList.php index b07217b7..9637f499 100644 --- a/framework/Collections/TPagedList.php +++ b/framework/Collections/TPagedList.php @@ -68,7 +68,7 @@ class TPagedList extends TList /** * @var integer current page index */ - private $_currentPageIndex=0; + private $_currentPageIndex=-1; /** * @var integer user-assigned number of items in data source */ @@ -310,7 +310,10 @@ class TPagedList extends TList */ public function itemAt($index) { - return parent::itemAt($this->_pageSize*$this->_currentPageIndex+$index); + if($this->_customPaging) + return parent::itemAt($index); + else + return parent::itemAt($this->_pageSize*$this->_currentPageIndex+$index); } /** -- cgit v1.2.3