cvs: pear /Pager Common.php Jumping.php Sliding.php package.xml
| From: | Lorenzo Alberton | Date: | Wed, 10 Dec 2003 20:20:43 +0000 |
| Subject: | cvs: pear /Pager Common.php Jumping.php Sliding.php package.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-14773@lists.php.net to get a copy of this message | ||
quipo Wed Dec 10 15:20:43 2003 EDT
Modified files:
/pear/Pager Common.php Jumping.php Sliding.php package.xml
Log:
- Added getPageRangeByPageId()
- Fix getOffsetByPageId() in Pager_Sliding for BC with Pager 1.x and Pager_Jumping.
N.B.: its previous (not-indended) behaviour is now provided by the new getPageRangeByPageId()
method.
- Fix getPageRangeByPageId() in Pager_Jumping (check for bounds)
Index: pear/Pager/Common.php diff -u pear/Pager/Common.php:1.2 pear/Pager/Common.php:1.3 --- pear/Pager/Common.php:1.2 Sun Nov 30 12:28:57 2003 +++ pear/Pager/Common.php Wed Dec 10 15:20:42 2003 @@ -33,7 +33,7 @@ // | Lorenzo Alberton <l.alberton at quipo.it> | // +-----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ +// $Id: Common.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ /** * File Common.php @@ -55,7 +55,7 @@ * * @author Richard Heyes <richard@phpguru.org>, * @author Lorenzo Alberton <l.alberton at quipo.it> - * @version $Id: Common.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ + * @version $Id: Common.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ * @package Pager */ class Pager_Common @@ -364,8 +364,32 @@ */ function getOffsetByPageId($pageid = null) { + $pageid = isset($pageid) ? $pageid : $this->_currentPage; + if (!isset($this->_pageData)) { + $this->_generatePageData(); + } + + if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) { + return array( + max(($this->_perPage * ($pageid - 1)) + 1, 1), + min($this->_totalItems, $this->_perPage * $pageid) + ); + } else { + return array(0, 0); + } + } + + // }}} + // {{{ getPageRangeByPageId() + + /** + * @param integer PageID to get offsets for + * @return array First and last offsets + */ + function getPageRangeByPageId($pageID) + { $msg = '<b>PEAR::Pager Error:</b>' - .' function "getOffsetByPageId()" not implemented.'; + .' function "getPageRangeByPageId()" not implemented.'; return $this->raiseError($msg, ERROR_PAGER_NOT_IMPLEMENTED); } Index: pear/Pager/Jumping.php diff -u pear/Pager/Jumping.php:1.2 pear/Pager/Jumping.php:1.3 --- pear/Pager/Jumping.php:1.2 Sun Nov 30 12:28:57 2003 +++ pear/Pager/Jumping.php Wed Dec 10 15:20:42 2003 @@ -33,7 +33,7 @@ // | Lorenzo Alberton <l.alberton at quipo.it> | // +-----------------------------------------------------------------------+ // -// $Id: Jumping.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ +// $Id: Jumping.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ require_once 'Pager/Common.php'; @@ -50,7 +50,7 @@ * @author Richard Heyes <richard@phpguru.org>, * @author Lorenzo Alberton <l.alberton at quipo.it> * - * @version $Id: Jumping.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ + * @version $Id: Jumping.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ * @package Pager */ class Pager_Jumping extends Pager_Common @@ -101,63 +101,38 @@ } // }}} - // {{{ getOffsetByPageId() + // {{{ getPageRangeByPageId() /** - * Returns offsets for given pageID. Eg, if you - * pass it pageID one and your perPage limit is 10 - * it will return you 1 and 10. PageID of 2 would - * give you 11 and 20. + * Given a PageId, it returns the limits of the range of pages displayed. + * While getOffsetByPageId() returns the offset of the data within the + * current page, this method returns the offsets of the page numbers interval. + * E.g., if you have pageId=3 and delta=10, it will return (1, 10). + * PageID of 8 would give you (1, 10) as well, because 1 <= 8 <= 10. + * PageID of 11 would give you (11, 20). + * If the method is called without parameter, pageID is set to currentPage#. * - * @param pageID PageID to get offsets for + * @param integer PageID to get offsets for * @return array First and last offsets + * @access public */ - function getOffsetByPageId($pageid = null) + function getPageRangeByPageId($pageid = null) { - $pageid = isset($pageid) ? $pageid : $this->_currentPage; - if (!isset($this->_pageData)) { - $this->_generatePageData(); - } - - if (isset($this->_pageData[$pageid]) || $this->_itemData === null) { + $pageid = isset($pageid) ? (int)$pageid : $this->_currentPage; + if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) { + // I'm sure I'm missing something here, but this formula works + // so I'm using it until I find something simpler. + $start = ((($pageid + (($this->_delta - ($pageid % $this->_delta))) % $this->_delta) / $this->_delta) - 1) * $this->_delta +1; return array( - max(($this->_perPage * ($pageid - 1)) + 1, 1), - min($this->_totalItems, $this->_perPage * $pageid) - ); + max($start, 1), + min($start+$this->_delta-1, $this->_totalPages) + ); } else { return array(0, 0); } } // }}} - // {{{ _getPageRangeByPageId() - - /** - * Internal method. Given a PageId, it returns the - * limits of the range of pages displayed. - * While getOffsetByPageId() returns the offset of - * the data within the current page, this method - * returns the offsets of the page numbers interval. - * E.g., if you have perPage=10 and pageId=3, - * it will return you 1 and 10. PageID of 8 would - * give you 1 and 10 as well, because 1 <= 8 <= 10. - * PageID of 11 would give you 11 and 20. - * - * @param pageID PageID to get offsets for - * @return array First and last offsets - * @access private - */ - function _getPageRangeByPageId($pageid = null) - { - $pageid = isset($pageid) ? $pageid : $this->_currentPage; - //I'm sure I'm missing something here, - //but this formula works so I'm using it - //until I find something simpler. - $start = ((($pageid + (($this->_delta - ($pageid % $this->_delta))) % $this->_delta) / $this->_delta) - 1) * $this->_delta +1; - return array(max($start, 1), $start+$this->_delta-1); - } - - // }}} // {{{ getLinks() /** @@ -168,12 +143,14 @@ * $back_html and $next_html. Now the only parameter accepted is * an integer ($pageID), since the html text for prev/next links can * be set in the constructor. If a second parameter is provided, then - * the method act as it previously did. This hack was done to mantain - * backward compatibility only. + * the method act as it previously did. This hack's only purpose is to + * mantain backward compatibility. * * @param integer $pageID Optional pageID. If specified, links - * for that page are provided instead of current one. [ADDED IN NEW PAGER VERSION] - * @param string $next_html HTML to put inside the next link [deprecated: use the constructor instead] + * for that page are provided instead of current one. + * [ADDED IN NEW PAGER VERSION] + * @param string $next_html HTML to put inside the next link + * [deprecated: use the constructor instead] * @return array Back/pages/next links */ function getLinks($pageID=null, $next_html='') @@ -233,7 +210,8 @@ /** * Returns pages link * - * @param $url URL to use in the link [deprecated: use the constructor instead] + * @param $url URL to use in the link + * [deprecated: use the constructor instead] * @return string Links * @access private */ @@ -247,7 +225,7 @@ $links = ''; - $limits = $this->_getPageRangeByPageId($this->_currentPage); + $limits = $this->getPageRangeByPageId($this->_currentPage); for ($i=$limits[0]; $i<=min($limits[1], $this->_totalPages); $i++) { if ($i != $this->_currentPage) { Index: pear/Pager/Sliding.php diff -u pear/Pager/Sliding.php:1.2 pear/Pager/Sliding.php:1.3 --- pear/Pager/Sliding.php:1.2 Sun Nov 30 12:28:57 2003 +++ pear/Pager/Sliding.php Wed Dec 10 15:20:42 2003 @@ -15,7 +15,7 @@ // | Author: Lorenzo Alberton <l.alberton at quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: Sliding.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ +// $Id: Sliding.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ require_once 'Pager/Common.php'; @@ -30,7 +30,7 @@ * Usage examples can be found in the doc provided * * @author Lorenzo Alberton <l.alberton at quipo.it> - * @version $Id: Sliding.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ + * @version $Id: Sliding.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ * @package Pager */ class Pager_Sliding extends Pager_Common @@ -47,14 +47,14 @@ function Pager_Sliding($options = array()) { //set default Pager_Sliding options - $this->_delta = 2; - $this->_prevImg = '«'; - $this->_nextImg = '»'; - $this->_separator = '|'; + $this->_delta = 2; + $this->_prevImg = '«'; + $this->_nextImg = '»'; + $this->_separator = '|'; $this->_spacesBeforeSeparator = 3; $this->_spacesAfterSeparator = 3; - $this->_curPageSpanPre = '<b><u>'; - $this->_curPageSpanPost = '</u></b>'; + $this->_curPageSpanPre = '<b><u>'; + $this->_curPageSpanPost = '</u></b>'; //set custom options $this->_setOptions($options); @@ -85,25 +85,28 @@ */ function getPageIdByOffset($index=null) { } - // }}} - // {{{ getOffsetByPageId() + // }}} + // {{{ getPageRangeByPageId() /** - * Returns offsets for given pageID. Eg, if you pass pageID=5 and your - * delta is 2, it will return 3 and 7. A pageID of 6 would give you 4 and 8 + * Given a PageId, it returns the limits of the range of pages displayed. + * While getOffsetByPageId() returns the offset of the data within the + * current page, this method returns the offsets of the page numbers interval. + * E.g., if you have pageId=5 and delta=2, it will return (3, 7). + * PageID of 9 would give you (4, 8). * If the method is called without parameter, pageID is set to currentPage#. * - * @param integer $pageid PageID to get offsets for + * @param integer PageID to get offsets for * @return array First and last offsets * @access public */ - function getOffsetByPageId($pageid=null) + function getPageRangeByPageId($pageid = null) { $pageid = isset($pageid) ? (int)$pageid : $this->_currentPage; if (!isset($this->_pageData)) { $this->_generatePageData(); } - if (isset($this->_pageData[$pageid]) || $this->_itemData === null) { + if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) { if ($this->_expanded) { $min_surplus = ($pageid <= $this->_delta) ? ($this->_delta - $pageid + 1) : 0; $max_surplus = ($pageid >= ($this->_totalPages - $this->_delta)) ? @@ -218,7 +221,6 @@ } } - $_expansion_after = 0; for ($i = $this->_currentPage - $this->_delta; ($i <= $this->_currentPage + $this->_delta) && ($i <= $this->_totalPages); $i++) { if ($i<1) { Index: pear/Pager/package.xml diff -u pear/Pager/package.xml:1.13 pear/Pager/package.xml:1.14 --- pear/Pager/package.xml:1.13 Sun Nov 30 12:38:23 2003 +++ pear/Pager/package.xml Wed Dec 10 15:20:42 2003 @@ -24,13 +24,16 @@ </maintainers> <release> - <version>2.0.1</version> + <version>2.1.0</version> <date>2003-12-XX</date> <state>stable</state> <notes> <![CDATA[ +- Added getPageRangeByPageId() +- Fix getOffsetByPageId() in Pager_Jumping when totalItems == 0. +- Fix getOffsetByPageId() in Pager_Sliding for BC with Pager 1.x and Pager_Jumping. + N.B.: its previous (not-indended) behaviour is now provided by the new getPageRangeByPageId() method. - Fix isFirstPage() when totalItems == 0 -- Fix getOffsetByPageId() in Pager_Jumping when totalItems == 0 - Added test suite. ]]> </notes> @@ -55,6 +58,7 @@ <file role="test" name="pager_jumping_tests.php" /> <file role="test" name="pager_noData_test.php" /> <file role="test" name="pager_sliding_noData_test.php" /> + <file role="test" name="pager_sliding_notExpanded_test.php" /> <file role="test" name="pager_sliding_test.php" /> <file role="test" name="pager_sliding_tests.php" /> <file role="test" name="pager_test.php" /> @@ -71,14 +75,17 @@ <changelog> <release> - <version>2.0.1</version> + <version>2.1.0</version> <date>2003-12-XX</date> <license>BSD</license> <state>stable</state> <notes> <![CDATA[ +- Added getPageRangeByPageId() +- Fix getOffsetByPageId() in Pager_Jumping when totalItems == 0. +- Fix getOffsetByPageId() in Pager_Sliding for BC with Pager 1.x and Pager_Jumping. + N.B.: its previous (not-indended) behaviour is now provided by the new getPageRangeByPageId() method. - Fix isFirstPage() when totalItems == 0 -- Fix getOffsetByPageId() in Pager_Jumping when totalItems == 0 - Added test suite. ]]> </notes> @@ -107,7 +114,7 @@ <state>stable</state> <notes> - Minor patch for script_name vs php_self (not included in v.1.0.7) -- Prevent URL modification +- Prevent URL modification </notes> </release>
Index: pear/Pager/Common.php diff -u pear/Pager/Common.php:1.2 pear/Pager/Common.php:1.3 --- pear/Pager/Common.php:1.2 Sun Nov 30 12:28:57 2003 +++ pear/Pager/Common.php Wed Dec 10 15:20:42 2003 @@ -33,7 +33,7 @@ // | Lorenzo Alberton <l.alberton at quipo.it> | // +-----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ +// $Id: Common.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ /** * File Common.php @@ -55,7 +55,7 @@ * * @author Richard Heyes <richard@phpguru.org>, * @author Lorenzo Alberton <l.alberton at quipo.it> - * @version $Id: Common.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ + * @version $Id: Common.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ * @package Pager */ class Pager_Common @@ -364,8 +364,32 @@ */ function getOffsetByPageId($pageid = null) { + $pageid = isset($pageid) ? $pageid : $this->_currentPage; + if (!isset($this->_pageData)) { + $this->_generatePageData(); + } + + if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) { + return array( + max(($this->_perPage * ($pageid - 1)) + 1, 1), + min($this->_totalItems, $this->_perPage * $pageid) + ); + } else { + return array(0, 0); + } + } + + // }}} + // {{{ getPageRangeByPageId() + + /** + * @param integer PageID to get offsets for + * @return array First and last offsets + */ + function getPageRangeByPageId($pageID) + { $msg = '<b>PEAR::Pager Error:</b>' - .' function "getOffsetByPageId()" not implemented.'; + .' function "getPageRangeByPageId()" not implemented.'; return $this->raiseError($msg, ERROR_PAGER_NOT_IMPLEMENTED); } Index: pear/Pager/Jumping.php diff -u pear/Pager/Jumping.php:1.2 pear/Pager/Jumping.php:1.3 --- pear/Pager/Jumping.php:1.2 Sun Nov 30 12:28:57 2003 +++ pear/Pager/Jumping.php Wed Dec 10 15:20:42 2003 @@ -33,7 +33,7 @@ // | Lorenzo Alberton <l.alberton at quipo.it> | // +-----------------------------------------------------------------------+ // -// $Id: Jumping.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ +// $Id: Jumping.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ require_once 'Pager/Common.php'; @@ -50,7 +50,7 @@ * @author Richard Heyes <richard@phpguru.org>, * @author Lorenzo Alberton <l.alberton at quipo.it> * - * @version $Id: Jumping.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ + * @version $Id: Jumping.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ * @package Pager */ class Pager_Jumping extends Pager_Common @@ -101,63 +101,38 @@ } // }}} - // {{{ getOffsetByPageId() + // {{{ getPageRangeByPageId() /** - * Returns offsets for given pageID. Eg, if you - * pass it pageID one and your perPage limit is 10 - * it will return you 1 and 10. PageID of 2 would - * give you 11 and 20. + * Given a PageId, it returns the limits of the range of pages displayed. + * While getOffsetByPageId() returns the offset of the data within the + * current page, this method returns the offsets of the page numbers interval. + * E.g., if you have pageId=3 and delta=10, it will return (1, 10). + * PageID of 8 would give you (1, 10) as well, because 1 <= 8 <= 10. + * PageID of 11 would give you (11, 20). + * If the method is called without parameter, pageID is set to currentPage#. * - * @param pageID PageID to get offsets for + * @param integer PageID to get offsets for * @return array First and last offsets + * @access public */ - function getOffsetByPageId($pageid = null) + function getPageRangeByPageId($pageid = null) { - $pageid = isset($pageid) ? $pageid : $this->_currentPage; - if (!isset($this->_pageData)) { - $this->_generatePageData(); - } - - if (isset($this->_pageData[$pageid]) || $this->_itemData === null) { + $pageid = isset($pageid) ? (int)$pageid : $this->_currentPage; + if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) { + // I'm sure I'm missing something here, but this formula works + // so I'm using it until I find something simpler. + $start = ((($pageid + (($this->_delta - ($pageid % $this->_delta))) % $this->_delta) / $this->_delta) - 1) * $this->_delta +1; return array( - max(($this->_perPage * ($pageid - 1)) + 1, 1), - min($this->_totalItems, $this->_perPage * $pageid) - ); + max($start, 1), + min($start+$this->_delta-1, $this->_totalPages) + ); } else { return array(0, 0); } } // }}} - // {{{ _getPageRangeByPageId() - - /** - * Internal method. Given a PageId, it returns the - * limits of the range of pages displayed. - * While getOffsetByPageId() returns the offset of - * the data within the current page, this method - * returns the offsets of the page numbers interval. - * E.g., if you have perPage=10 and pageId=3, - * it will return you 1 and 10. PageID of 8 would - * give you 1 and 10 as well, because 1 <= 8 <= 10. - * PageID of 11 would give you 11 and 20. - * - * @param pageID PageID to get offsets for - * @return array First and last offsets - * @access private - */ - function _getPageRangeByPageId($pageid = null) - { - $pageid = isset($pageid) ? $pageid : $this->_currentPage; - //I'm sure I'm missing something here, - //but this formula works so I'm using it - //until I find something simpler. - $start = ((($pageid + (($this->_delta - ($pageid % $this->_delta))) % $this->_delta) / $this->_delta) - 1) * $this->_delta +1; - return array(max($start, 1), $start+$this->_delta-1); - } - - // }}} // {{{ getLinks() /** @@ -168,12 +143,14 @@ * $back_html and $next_html. Now the only parameter accepted is * an integer ($pageID), since the html text for prev/next links can * be set in the constructor. If a second parameter is provided, then - * the method act as it previously did. This hack was done to mantain - * backward compatibility only. + * the method act as it previously did. This hack's only purpose is to + * mantain backward compatibility. * * @param integer $pageID Optional pageID. If specified, links - * for that page are provided instead of current one. [ADDED IN NEW PAGER VERSION] - * @param string $next_html HTML to put inside the next link [deprecated: use the constructor instead] + * for that page are provided instead of current one. + * [ADDED IN NEW PAGER VERSION] + * @param string $next_html HTML to put inside the next link + * [deprecated: use the constructor instead] * @return array Back/pages/next links */ function getLinks($pageID=null, $next_html='') @@ -233,7 +210,8 @@ /** * Returns pages link * - * @param $url URL to use in the link [deprecated: use the constructor instead] + * @param $url URL to use in the link + * [deprecated: use the constructor instead] * @return string Links * @access private */ @@ -247,7 +225,7 @@ $links = ''; - $limits = $this->_getPageRangeByPageId($this->_currentPage); + $limits = $this->getPageRangeByPageId($this->_currentPage); for ($i=$limits[0]; $i<=min($limits[1], $this->_totalPages); $i++) { if ($i != $this->_currentPage) { Index: pear/Pager/Sliding.php diff -u pear/Pager/Sliding.php:1.2 pear/Pager/Sliding.php:1.3 --- pear/Pager/Sliding.php:1.2 Sun Nov 30 12:28:57 2003 +++ pear/Pager/Sliding.php Wed Dec 10 15:20:42 2003 @@ -15,7 +15,7 @@ // | Author: Lorenzo Alberton <l.alberton at quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: Sliding.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ +// $Id: Sliding.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ require_once 'Pager/Common.php'; @@ -30,7 +30,7 @@ * Usage examples can be found in the doc provided * * @author Lorenzo Alberton <l.alberton at quipo.it> - * @version $Id: Sliding.php,v 1.2 2003/11/30 17:28:57 quipo Exp $ + * @version $Id: Sliding.php,v 1.3 2003/12/10 20:20:42 quipo Exp $ * @package Pager */ class Pager_Sliding extends Pager_Common @@ -47,14 +47,14 @@ function Pager_Sliding($options = array()) { //set default Pager_Sliding options - $this->_delta = 2; - $this->_prevImg = '«'; - $this->_nextImg = '»'; - $this->_separator = '|'; + $this->_delta = 2; + $this->_prevImg = '«'; + $this->_nextImg = '»'; + $this->_separator = '|'; $this->_spacesBeforeSeparator = 3; $this->_spacesAfterSeparator = 3; - $this->_curPageSpanPre = '<b><u>'; - $this->_curPageSpanPost = '</u></b>'; + $this->_curPageSpanPre = '<b><u>'; + $this->_curPageSpanPost = '</u></b>'; //set custom options $this->_setOptions($options); @@ -85,25 +85,28 @@ */ function getPageIdByOffset($index=null) { } - // }}} - // {{{ getOffsetByPageId() + // }}} + // {{{ getPageRangeByPageId() /** - * Returns offsets for given pageID. Eg, if you pass pageID=5 and your - * delta is 2, it will return 3 and 7. A pageID of 6 would give you 4 and 8 + * Given a PageId, it returns the limits of the range of pages displayed. + * While getOffsetByPageId() returns the offset of the data within the + * current page, this method returns the offsets of the page numbers interval. + * E.g., if you have pageId=5 and delta=2, it will return (3, 7). + * PageID of 9 would give you (4, 8). * If the method is called without parameter, pageID is set to currentPage#. * - * @param integer $pageid PageID to get offsets for + * @param integer PageID to get offsets for * @return array First and last offsets * @access public */ - function getOffsetByPageId($pageid=null) + function getPageRangeByPageId($pageid = null) { $pageid = isset($pageid) ? (int)$pageid : $this->_currentPage; if (!isset($this->_pageData)) { $this->_generatePageData(); } - if (isset($this->_pageData[$pageid]) || $this->_itemData === null) { + if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) { if ($this->_expanded) { $min_surplus = ($pageid <= $this->_delta) ? ($this->_delta - $pageid + 1) : 0; $max_surplus = ($pageid >= ($this->_totalPages - $this->_delta)) ? @@ -218,7 +221,6 @@ } } - $_expansion_after = 0; for ($i = $this->_currentPage - $this->_delta; ($i <= $this->_currentPage + $this->_delta) && ($i <= $this->_totalPages); $i++) { if ($i<1) { Index: pear/Pager/package.xml diff -u pear/Pager/package.xml:1.13 pear/Pager/package.xml:1.14 --- pear/Pager/package.xml:1.13 Sun Nov 30 12:38:23 2003 +++ pear/Pager/package.xml Wed Dec 10 15:20:42 2003 @@ -24,13 +24,16 @@ </maintainers> <release> - <version>2.0.1</version> + <version>2.1.0</version> <date>2003-12-XX</date> <state>stable</state> <notes> <![CDATA[ +- Added getPageRangeByPageId() +- Fix getOffsetByPageId() in Pager_Jumping when totalItems == 0. +- Fix getOffsetByPageId() in Pager_Sliding for BC with Pager 1.x and Pager_Jumping. + N.B.: its previous (not-indended) behaviour is now provided by the new getPageRangeByPageId() method. - Fix isFirstPage() when totalItems == 0 -- Fix getOffsetByPageId() in Pager_Jumping when totalItems == 0 - Added test suite. ]]> </notes> @@ -55,6 +58,7 @@ <file role="test" name="pager_jumping_tests.php" /> <file role="test" name="pager_noData_test.php" /> <file role="test" name="pager_sliding_noData_test.php" /> + <file role="test" name="pager_sliding_notExpanded_test.php" /> <file role="test" name="pager_sliding_test.php" /> <file role="test" name="pager_sliding_tests.php" /> <file role="test" name="pager_test.php" /> @@ -71,14 +75,17 @@ <changelog> <release> - <version>2.0.1</version> + <version>2.1.0</version> <date>2003-12-XX</date> <license>BSD</license> <state>stable</state> <notes> <![CDATA[ +- Added getPageRangeByPageId() +- Fix getOffsetByPageId() in Pager_Jumping when totalItems == 0. +- Fix getOffsetByPageId() in Pager_Sliding for BC with Pager 1.x and Pager_Jumping. + N.B.: its previous (not-indended) behaviour is now provided by the new getPageRangeByPageId() method. - Fix isFirstPage() when totalItems == 0 -- Fix getOffsetByPageId() in Pager_Jumping when totalItems == 0 - Added test suite. ]]> </notes> @@ -107,7 +114,7 @@ <state>stable</state> <notes> - Minor patch for script_name vs php_self (not included in v.1.0.7) -- Prevent URL modification +- Prevent URL modification </notes> </release>