madcorp / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

recordsPerPage will be overwritten if saved in session #834

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a grid, use saveParamsInSession = true
2. set number of records to show to something other than default
3. leave the grid then return

What is the expected output? What do you see instead?
expected:
as "saveParamsInSession" is "true", the grid should still show the number of 
records that were set before (different from the default)
instead:
number of records went back to default

Please insert the appropriate values;
                    Zend Framework version: 1.11.11
ZFDatgrid Version (Bvb_Grid::getVersion()): 0.8
                          Operating system: Linux
                               PHP Version: 5.3.6
               Database Server and version: MySQL 5

Please provide any additional information below.

Grid.php, line 1519
if ($this->_paramsInSession === true && $this->getParam('perPage') === false) {
should be
if ($this->_paramsInSession === true && ($this->getParam('perPage') === false 
|| $this->getParam('perPage') === NULL)) {

as $this->getParam('perPage') is not "false" but "NULL" when returning back to 
the grid

Original issue reported on code.google.com by buegelfa...@gmail.com on 7 Mar 2012 at 1:22

GoogleCodeExporter commented 9 years ago
Hi,

Fixed and committed.

Thanks.

Best Regards
Ivo Monteiro

Original comment by ivomonte...@gmail.com on 7 Mar 2012 at 9:03

GoogleCodeExporter commented 9 years ago

Original comment by ivomonte...@gmail.com on 7 Mar 2012 at 9:03