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

Bug #9946 Update to Pager (bug fix in file HTMLWidgets.php)
Submitted: 2007-01-25 17:31 UTC
From: gurbani at gmail dot com Assigned: quipo
Status: Closed Package: Pager (version 2.4.3)
PHP Version: 5.2.0 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2007-01-25 17:31 UTC] gurbani at gmail dot com (Prem)
Description: ------------ Hi Lorenzo, I think I found a tiny bug in Pager. Basically, this is the case: - if the minimum limit in Pager is set e.g. to 25 - you only have e.g. 5 values - you want to have a Select Box - you set e.g. 'showAllText' => "All" THEN - The select box is returned with no option values, i.e. an empty Select Box I've put the following fix at the end of function getPerPageSelectBox in HtmlWidgets.php. It seems to work for me. Does it make sense to you? If so, can the library be updated with this fix? Thanks Prem Test script: --------------- (end of function getPerPageSelectBox, HtmlWidgets.php) [..........] $tmp .= $this->pager->_showAllText; } $tmp .= '</option>'; } else if ($showAllData) { $tmp .= '<option value="'.$this->pager->_totalItems.'" selected="selected">'; if (empty($this->pager->_showAllText)) { $tmp .= str_replace('%d', $this->pager->_totalItems, $optionText); } else { $tmp .= $this->pager->_showAllText; } $tmp .= '</option>'; } $tmp .= '</select>'; return $tmp; }

Comments

 [2007-01-25 19:06 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!