merge from 1.5.3 (~r10943)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@10951 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-07-27 02:47:10 +00:00
parent 7aa4798373
commit 54e3a72065
334 changed files with 13011 additions and 5561 deletions

View file

@ -2,7 +2,7 @@
/**
* @class PageHandler
* @author NHN (developers@xpressengine.com)
* @brief handles page navigation
* handles page navigation
* @version 0.1
*
* @remarks Getting total counts, number of pages, current page number, number of items per page,
@ -20,11 +20,12 @@
var $point = 0; ///< increments per getNextPage()
/**
* @brief constructor
* @param[in] $total_count number of total items
* @param[in] $total_page number of total pages
* @param[in] $cur_page current page number
* @param[in] $page_count number of page links displayed at one time
* constructor
* @param int $total_count number of total items
* @param int $total_page number of total pages
* @param int $cur_page current page number
* @param int $page_count number of page links displayed at one time
* @return void
**/
function PageHandler($total_count, $total_page, $cur_page, $page_count = 10) {
$this->total_count = $total_count;
@ -45,8 +46,8 @@
}
/**
* @brief request next page
* @return next page number
* request next page
* @return int next page number
**/
function getNextPage() {
$page = $this->first_page+$this->point++;
@ -54,6 +55,11 @@
return $page;
}
/**
* return number of page that added offset.
* @param int $offset
* @return int
**/
function getPage($offset)
{
return max(min($this->cur_page + $offset, $this->total_page), '');