cvs: pear /Structures_DataGrid DataGrid.php
| From: | Olivier Guilyardi | Date: | Mon, 27 Feb 2006 22:41:37 +0000 |
| Subject: | cvs: pear /Structures_DataGrid DataGrid.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38711@lists.php.net to get a copy of this message | ||
olivierg Mon Feb 27 22:41:37 2006 UTC
Modified files:
/pear/Structures_DataGrid DataGrid.php
Log:
When using setRequestPrefix(), the Request parameters were ignored
http://cvs.php.net/viewcvs.cgi/pear/Structures_DataGrid/DataGrid.php?r1=1.40&r2=1.41&diff_format=u
Index: pear/Structures_DataGrid/DataGrid.php
diff -u pear/Structures_DataGrid/DataGrid.php:1.40 pear/Structures_DataGrid/DataGrid.php:1.41
--- pear/Structures_DataGrid/DataGrid.php:1.40 Mon Feb 27 21:06:20 2006
+++ pear/Structures_DataGrid/DataGrid.php Mon Feb 27 22:41:37 2006
@@ -18,7 +18,7 @@
// | Mark Wiesemann <wiesemann@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: DataGrid.php,v 1.40 2006/02/27 21:06:20 olivierg Exp $
+// $Id: DataGrid.php,v 1.41 2006/02/27 22:41:37 olivierg Exp $
require_once 'PEAR.php';
@@ -72,7 +72,7 @@
* ?>
* </code>
*
- * @version $Revision: 1.40 $
+ * @version $Revision: 1.41 $
* @author Andrew S. Nagy <asnagy@webitecture.org>
* @author Olivier Guilyardi <olivier@samalyse.com>
* @author Mark Wiesemann <wiesemann@php.net>
@@ -593,7 +593,17 @@
$this->_parseHttpRequest();
if (isset($this->_renderer)) {
+
$this->_renderer->setRequestPrefix($prefix);
+
+ /* We just called parseHttpRequest() using a new requestPrefix.
+ * The page and sort request might have changed, so we need
+ * to pass them again to the renderer */
+ $this->_renderer->setLimit($this->page, $this->rowLimit,
+ $this->getRecordCount());
+ if (isset($this->sortArray)) {
+ $this->_renderer->setCurrentSorting($this->sortArray[0],
$this->sortArray[1]);
+ }
}
}