Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.1

Request #11697 Pager_Jumping::build() lose first and last page string concatenation
Submitted: 2007-07-28 16:35 UTC
From: chihwen Assigned: quipo
Status: Closed Package: Pager (version 2.4.3)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 43 - 24 = ?

 
 [2007-07-28 16:35 UTC] chihwen (Chih-Wen Yang)
Description: ------------ The class variable $this->links in Pager_Jumping::build() lose first and last page string concatenation. if ($this->_totalPages > $this->_delta) { $this->links .= $this->_printFirstPage(); } if ($this->_totalPages > $this->_delta) { $this->links .= $this->_printLastPage(); } But force to do this... $links = $pager->getLinks($pager->getCurrentPageID());

Comments

 [2007-07-28 16:45 UTC] quipo (Lorenzo Alberton)
That's the expected behaviour. If all the links are displayed in the page (because the n. of pages is less than delta), there's no need for extra links to the first and last page, they would be a duplicate. You already have them in the page.
 [2007-07-29 03:55 UTC] chihwen (Chih-Wen Yang)
1. Suppose the pageID is 26 2. and Pager options is... $params = array( 'mode' => 'Jumping', 'perPage' => 1, 'delta' => 10, 'totalItems' => 100, ); 3. Then $links = $pager->getLinks(); the $links['all'] => << Back 21 22 23 24 25 26 27 28 29 30 Next >> 4. But $links = $pager->getLinks(26); (Or $links = $pager->getLinks($pager->getCurrentPageID());) the $links['all'] => [1] << Back 21 22 23 24 25 26 27 28 29 30 Next >> [100] The behavior is not consistent.
 [2007-07-29 07:28 UTC] quipo (Lorenzo Alberton)
Then I didn't understand what you mean. Can you post a simple reproducing script?
 [2007-07-29 08:11 UTC] quipo (Lorenzo Alberton)
Ah, now I see it. Fixed in CVS, thanks
 [2007-07-29 08:19 UTC] chihwen (Chih-Wen Yang)
Thanks..^^