Skip to content

Commit

Permalink
(Fixes issue 1163).
Browse files Browse the repository at this point in the history
  • Loading branch information
qiang.xue committed Apr 26, 2010
1 parent 31ecd45 commit 6df794d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions framework/web/widgets/pagers/CLinkPager.php
Expand Up @@ -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)
Expand All @@ -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;
}
Expand Down

0 comments on commit 6df794d

Please sign in to comment.