Pager
pear.php.net
Data paging class
It takes an array of data as input and pages it according to various parameters. It also builds links within a specified range, and allows complete customization of the output (it even works with front controllers and mod_rewrite). Two operating modes available: "Jumping" and "Sliding" window style.
Lorenzo Alberton
quipo
l.alberton@quipo.it yes
Richard Heyes
richard
richard@phpguru.org no
2009-04-21
22:48:53
2.4.8
2.4.8
stable
stable
BSD
- request #15949: add autoSubmit option to getPerPageSelectBox() [Matt Rosenquist] - fix potential issues with encoding in getPerPageSelectBox() and getPageSelectBox()
4.0.0
1.4.0b1
2.4.8
2.4.8
stable
stable
2009-04-21
BSD
- request #15949: add autoSubmit option to getPerPageSelectBox() [Matt Rosenquist] - fix potential issues with encoding in getPerPageSelectBox() and getPageSelectBox()
2.4.7
2.4.7
stable
stable
2008-08-11
BSD
- fixed bug #13604: WARNINGS with PHP 5.3-dev [thanks to Chris Troup] - request #13567: support for regexp in 'excludeVars' [thanks to Stefano Coletta] - fixed bug #13913 empty prev/next image shown when only one page exists [cweiske] - fixed bug #13881: fix for relative links (introduced in v.2.4.5) may cause some issues with absolute links
2.4.6
2.4.6
stable
stable
2008-03-28
BSD
- fixed bug #13316: NOTICE in getLinks() in Jumping mode - fixed bug #13342: getLinks() returns wrong result with multi-byte arrays - fixed bug #13469: getPerPageSelectBox() can produce invalid xhtml with no data - fixed bug #13472: PHP 6 Removes get_magic_quotes_gpc() - fixed bug #13506: POST method deletes querystring - request #13509: added 'prevImgEmpty' and 'nextImgEmpty' options to show a disabled prev/next page link when you are on the last/first page (cweiske)
2.4.5
2.4.5
stable
stable
2008-02-23
BSD
- request #10869: added two reverse drivers in the /examples/ dir - fixed a few PHP5 Strict Standards warnings (bug #12257 and #12934) - Coding Standards fixes in the phpdoc blocks - added 'PAGER_' prefix to internal constant names - fixed bug #12267: correct detection of HTTPS on IIS (thanks to Carsten Wiedmann) - fixed bug #12306: allow relative links - fixed bug #12531: removed <u> tag from curPageSpan[Pre|Post] default options in Pager_Sliding to make links HTML 4.01 strict - request #12267: added $pager->linkTagsRaw array (same as $pager->linkTags but as array) to play nice with HTML_Page2 (patch by Carsten Wiedmann) - fixed bug #12796: curPageLinkClassName overrides curPageSpanPre and curPageSpanPost - request #12797: added '%d' as a placeholder to altPage (by default, page number is appended) - fixed bug #12837: if $_SESSION['setPerPage'] is set, Pager always uses it
2.4.4
2.4.4
stable
stable
2007-07-29
BSD
- handle UNION queries in the Wrapper (bug #9601) - getPerPagerSelectBox() with $showAllData = true and $start > $totalItems was returning an empty select menu (bug #9946) - added 'onclick' option (request #11241) - fixed bug #11697: Pager_Jumping::build() lose first and last page string concatenation
2.4.3
2.4.3
stable
stable
2006-12-03
BSD
- fixed issue with SSL (bug #7936) - items set in 'excludeVars' array were removed from the URL even if they were also set in the 'extraVars' array (bug #8969) - added new option 'checkMaxLimit' to getPerPageSelectBox(): if true, Pager checks if $end is bigger than $totalItems, and doesn't show the extra select options - moved Pager.php to the pear root and added a wrapper in the old location to adhere to PEAR policies (bug #2169) - switched to package.xml v2
2.4.2
2.4.2
stable
stable
2006-06-07
BSD
- fix double escaping of arg_separator when php.ini's arg_separator.output = "&amp;"
2.4.1
2.4.1
stable
stable
2006-05-06
BSD
- more flexible implementation of the factory pattern allowing people to use custom renderer classes that are not part of the Pager package (thanks to Martin Jansen)
2.4.0
2.4.0
stable
stable
2006-04-23
BSD
- added host to CURRENT_PATHNAME constant - added accesskey option (if true, accesskey attributes are added to the links) - fixed multibyte string issues with httpMethod==POST (bug #6812) - return empty array instead of FALSE in getPageData() on bad pageID (request #6986) - added Pager_HtmlWidgets class containing the methods getPerPageSelectBox() (moved from Pager_Common) and getPageSelectBox() (new, request #6998). The class is lazy-loaded when calling one of the two above methods from Pager. - Improved rewriteCountQuery() function in the Pager Wrapper. - added getOption($name) and getOptions() methods (request #7413) - changed _setOptions() [private] to setOptions() [public] - added build() to refresh the links and the paged data after a new call to setOptions() - added 'attributes' option to set extra attributes for the <a> tag (request #7452)
2.3.6
2.3.6
stable
stable
2006-02-03
BSD
- fixed bug #6680: error with fileName parameter having an extra "%" character
2.3.5
2.3.5
stable
stable
2006-01-20
BSD
- remove flicker (caused by href="#") during POST requests (request #6005) - added "formID" option to reuse an existing form in POST requests (thanks to Marc Veldman) - fixed bug #6529: problem with fields with quotes during POST requests
2.3.4
2.3.4
stable
stable
2005-09-28
BSD
- changed license to BSD - fixed bug #4897 (multibyte chars not handled correctly)
2.3.3
2.3.3
stable
stable
2005-07-04
PHP
- improved Pager_Wrapper and added tests - urlencoded square brackets (bug #4337) NB: We recommend that users of Pager < 2.3.0 immediately upgrade the package, otherwise they might be susceptible to XSS attacks
2.3.2
2.3.2
stable
stable
2005-06-03
PHP
- autodetect HTTP method used, when not specified, instead of forcing "GET" (bug #4277) - added "altFirst" and "altLast" options to set the "title" attribute of the first and last page links
2.3.1
2.3.1
stable
stable
2005-05-02
PHP
- fixed various issues with __http_build_query() and escaped entities - if the value of "arg_separator.output" in php.ini is "&amp;", don't encode it again - tweaked Pager_Wrapper query rewriting function, now it is fully case insensitive
2.3.0
2.3.0
stable
stable
2005-04-22
PHP
- tweaked Pager_Wrapper query rewriting function
2.3.0RC2
2.3.0RC2
beta
beta
2005-04-06
PHP
- fixed possible querystring duplication with front controllers
2.3.0RC1
2.3.0RC1
beta
beta
2005-04-01
PHP
- internal refactoring: added POST support: set the preferred http method ('GET' or 'POST') with the 'httpMethod' option. - used $_GET instead of reparsing the querystring [thanks to Nikolas 'Atrus' Coukouma] (fixed bugs #3450, #3878 and #3451) - added 'importQuery' boolean option to ignore the url vars entirely (bug #3449) - added 'excludeVars' array option to selectively exclude some url vars (bug #2461) - countless code optimizations - added many new test cases to the testsuite
2.2.7
2.2.7
stable
stable
2005-03-18
PHP
- added Pager_Wrapper_Eclipse() function in the /examples/Pager_Wrapper example (thanks to Matte Edens) - added support for statements with subqueries in the Pager Wrappers (thanks to Tobias Kuckuck) - fixed bug #3451 (arrays in extraVars not handled correctly)
2.2.6
2.2.6
stable
stable
2005-02-04
PHP
- better 'currentPage' option support (thanks to Andrew Nagy) - fixed typo (thanks to Massimiliano Arione)
2.2.5
2.2.5
stable
stable
2005-01-17
PHP
- allowed use of a javascript function in the fileName [bugs #2555 and #2754] - added Pager_Wrapper_DBDO() function in the /examples/Pager_Wrapper example (thanks to garak AT studenti DOT it) - replaced urlencode() with htmlentities() because it was too aggressive [bugs #2908, #3043 and #3212] - added 'currentPage' option (patch by Kendrick Vargas)
2.2.4
2.2.4
stable
stable
2004-11-20
PHP
- fixed "Notice: Undefined property: _totalPages" [bug #2714] - enforce errors (which weren't displayed at all) - fixed Pager_Wrapper (examples dir) with GROUP BY queries - changed $_GET to $_REQUEST. POST values should be valid too, now. - Pager can be used on a DirectoryIndex script, now (patch by ieure) [bug #2617]
2.2.3
2.2.3
stable
stable
2004-08-17
PHP
- just the last one of a set of array values given as GET parameters (i.e. site.php?foo[]=1&foo[]=2&foo[]=3) was carried on (bug #1904). - make 4th parameter of getPerPageSelectBox() an array, and add an "attribute" parameter to allow extra attributes for the select tag. - added an example to show how this class can be used with big database resultsets efficiently. - prevent XSS attacks (bug #2131), thanks to sou_sk at nifty dot com
2.2.2
2.2.2
stable
stable
2004-05-18
PHP
- set correct selected value for getPerPageSelectBox even when "useSession" option is false (bug #1263). - added two parameters to getPerPageSelectBox(): * $showAllData (if true, an <option> to show all the data is displayed in the generated <select>); * $optionText (text to show in each <option>; use '%d' where you want to see the number of pages selected) - added showAllText option for alternate text in the $showAllData <option> (the default is the number of total items). - fixed getPageData() when $pageID is specified (bug #1377) (thanks to Ian Eure) - added tests for getPageData() - avoid duplicate vars in querystring when using 'extraVars' option (bug #1383) (thanks to pauluz at gazeta dot pl)
2.2.1
2.2.1
stable
stable
2004-04-15
PHP
- PHP5 compatibility (fixed bug #812) - Forced ucfirst() on filename too
2.2.0
2.2.0
stable
stable
2004-01-23
PHP
- Fixed handling of errors raised in common base class - Added an 'extraVars' option to add vars to the querystring - Added <link> tags building (patch by Joerg Bruckmann) - Fixed Bug #589 (common.php raise a notice if the querystring has no '=' character) - Use '&amp;' instead of '&' in urls for better XHTML conformance
2.1.0
2.1.0
stable
stable
2003-12-22
PHP
- 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 - Added test suite.
2.0
2.0
stable
stable
2003-09-10
PHP
- New major version. - Pager and Pager_Sliding are now merged in the same package. Every option available in Pager_Sliding is now also available in Pager. The API is the same as the old one, BC is kept 100%. - Switch between "Jumping" and "Sliding" window mode just setting an option. - Improved error handling.
1.0.8
1.0.8
stable
stable
2003-09-10
PHP
- Minor patch for script_name vs php_self (not included in v.1.0.7) - Prevent URL modification
1.0.7
1.0.7
stable
stable
2002-12-01
PHP
Minor patch for script_name vs php_self
1.0.6
1.0.6
stable
stable
2002-09-08
PHP
Updated to no longer require an array of data. Now can be used with just a number of items. Thanks to Christian Dickmann for the patch.
1.0.5
1.0.5
stable
stable
2002-07-27
PHP
Changed getCurrentPage() to getCurrentPageID() and added getNextPageID() and getPreviousPageID()
1.0.4
1.0.4
stable
stable
2002-06-29
PHP
Changed getCurrentPage() to getCurrentPageID() and added getNextPageID() and getPreviousPageID()
1.0.3
1.0.3
stable
stable
2002-05-31
PHP
Couple of minor bugs
1.0.2
1.0.2
stable
stable
2002-05-31
PHP
Applied patch from Christian Dickmann adding getCurrentPage(), numItems() and optional CSS class for links.
1.0.1
1.0.1
stable
stable
2002-05-27
PHP
o No longer barfs with no querystring o Now works with associative data array
1.0
1.0
stable
stable
2002-02-09
PHP
This is the initial release of the Pager package.