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 +++++-- framework/I18N/TChoiceFormat.php | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'framework') 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); } /** diff --git a/framework/I18N/TChoiceFormat.php b/framework/I18N/TChoiceFormat.php index 24080700..255bf638 100644 --- a/framework/I18N/TChoiceFormat.php +++ b/framework/I18N/TChoiceFormat.php @@ -20,6 +20,7 @@ * Get the ChoiceFormat class. */ Prado::using('System.I18N.core.ChoiceFormat'); +Prado::using('System.I18N.TTranslate'); /** * TChoiceFormat class. -- cgit v1.2.3