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] quipo (Lorenzo Alberton)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.