import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
* @package Zend_Paginator
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Elastic.php 16215 2009-06-21 19:36:07Z thomas $
|
||||
* @version $Id: Elastic.php 18951 2009-11-12 16:26:19Z alexander $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -28,7 +28,7 @@ require_once 'Zend/Paginator/ScrollingStyle/Sliding.php';
|
||||
* A Google-like scrolling style. Incrementally expands the range to about
|
||||
* twice the given page range, then behaves like a slider. See the example
|
||||
* link.
|
||||
*
|
||||
*
|
||||
* @link http://www.google.com/search?q=Zend+Framework
|
||||
* @category Zend
|
||||
* @package Zend_Paginator
|
||||
@ -39,7 +39,7 @@ class Zend_Paginator_ScrollingStyle_Elastic extends Zend_Paginator_ScrollingStyl
|
||||
{
|
||||
/**
|
||||
* Returns an array of "local" pages given a page number and range.
|
||||
*
|
||||
*
|
||||
* @param Zend_Paginator $paginator
|
||||
* @param integer $pageRange Unused
|
||||
* @return array
|
||||
@ -54,8 +54,10 @@ class Zend_Paginator_ScrollingStyle_Elastic extends Zend_Paginator_ScrollingStyl
|
||||
|
||||
if ($originalPageRange + $pageNumber - 1 < $pageRange) {
|
||||
$pageRange = $originalPageRange + $pageNumber - 1;
|
||||
} else if ($originalPageRange + $pageNumber - 1 > count($paginator)) {
|
||||
$pageRange = $originalPageRange + count($paginator) - $pageNumber;
|
||||
}
|
||||
|
||||
|
||||
return parent::getPages($paginator, $pageRange);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user