omusico / zfdatagrid

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

Doesn't work pagination with Bvb_Grid_Source_Array #767

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I click on different pages information the same.

I've fixed this problem like this:

--- old/library/Bvb/Grid/Source/Array.php
+++ new/library/Bvb/Grid/Source/Array.php 
@@ -161,6 +161,9 @@
      */
     public function buildQueryLimit($offset, $start)
     {
+        if (!$this->_totalRecords) {
+            $this->setTotalRecords(count($this->_rawResult));
+        }
         $this->_offset = $offset;
         $this->_start = ($this->_totalRecords != 0) ? $start : 0;
         return true;

Original issue reported on code.google.com by eugen...@gmail.com on 28 Sep 2011 at 8:31

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for the report and fix.

committed and fixed

Best Regards,
Bento Vilas Boas

Original comment by bento.vi...@gmail.com on 30 Sep 2011 at 5:02