Permalink
Browse files

(Fixes issue 1163).

  • Loading branch information...
1 parent 31ecd45 commit 6df794d4728428acaf8529b2ce10dae4e4fab446 qiang.xue committed Apr 26, 2010
Showing with 3 additions and 2 deletions.
  1. +1 −0 CHANGELOG
  2. +2 −2 framework/web/widgets/pagers/CLinkPager.php
View
@@ -43,6 +43,7 @@ Version 1.1.2 to be released
- Enh: Enhanced CActiveForm to make it more robust in case some code error occurs when performing ajax validation (Qiang)
- Chg #1118: CActiveRecord::refresh() now updates the record by directly updating the attributes array (Qiang)
- Chg #1125: Ability to use model metadata in behavior's attach() method (Sam Dark)
+- Chg #1163: CLinkPager will enable first and last page buttons unless the current page is first or last. (Qiang)
- New #1005: added CWinCache (Sam Dark)
- New: Added Ukrainian translations (Valeriy)
@@ -117,7 +117,7 @@ protected function createPageButtons()
$buttons=array();
// first page
- $buttons[]=$this->createPageButton($this->firstPageLabel,0,self::CSS_FIRST_PAGE,$beginPage<=0,false);
+ $buttons[]=$this->createPageButton($this->firstPageLabel,0,self::CSS_FIRST_PAGE,$currentPage<=0,false);
// prev page
if(($page=$currentPage-1)<0)
@@ -134,7 +134,7 @@ protected function createPageButtons()
$buttons[]=$this->createPageButton($this->nextPageLabel,$page,self::CSS_NEXT_PAGE,$currentPage>=$pageCount-1,false);
// last page
- $buttons[]=$this->createPageButton($this->lastPageLabel,$pageCount-1,self::CSS_LAST_PAGE,$endPage>=$pageCount-1,false);
+ $buttons[]=$this->createPageButton($this->lastPageLabel,$pageCount-1,self::CSS_LAST_PAGE,$currentPage>=$pageCount-1,false);
return $buttons;
}

0 comments on commit 6df794d

Please sign in to comment.