cvs: pear /Structures_DataGrid/DataGrid Renderer.php
| From: | Andrew Nagy | Date: | Tue, 01 Mar 2005 16:44:29 +0000 |
| Subject: | cvs: pear /Structures_DataGrid/DataGrid Renderer.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-29954@lists.php.net to get a copy of this message | ||
asnagy Tue Mar 1 11:44:29 2005 EDT
Modified files:
/pear/Structures_DataGrid/DataGrid Renderer.php
Log:
CVt: ----------------------------------------------------------------------
http://cvs.php.net/diff.php/pear/Structures_DataGrid/DataGrid/Renderer.php?r1=1.19&r2=1.20&ty=u
Index: pear/Structures_DataGrid/DataGrid/Renderer.php
diff -u pear/Structures_DataGrid/DataGrid/Renderer.php:1.19
pear/Structures_DataGrid/DataGrid/Renderer.php:1.20
--- pear/Structures_DataGrid/DataGrid/Renderer.php:1.19 Thu Feb 3 09:58:04 2005
+++ pear/Structures_DataGrid/DataGrid/Renderer.php Tue Mar 1 11:44:29 2005
@@ -16,7 +16,7 @@
// | Author: Andrew Nagy <asnagy@webitecture.org> |
// +----------------------------------------------------------------------+
//
-// $Id: Renderer.php,v 1.19 2005/02/03 14:58:04 asnagy Exp $
+// $Id: Renderer.php,v 1.20 2005/03/01 16:44:29 asnagy Exp $
require_once 'Structures/DataGrid/Core.php';
@@ -26,7 +26,7 @@
* This class handles managing the output for the DataGrid.
* By default, the output is handled by the HTML_Table renderer.
*
- * @version $Revision: 1.19 $
+ * @version $Revision: 1.20 $
* @author Andrew S. Nagy <asnagy@webitecture.org>
* @access public
* @package Structures_DataGrid
@@ -72,8 +72,9 @@
function fetchDataSource()
{
if ($this->_dataSource != null) {
+ $page = $this->page ? $this->page : $this->page - 1;
$recordSet = $this->_dataSource->fetch(
- (($this->page-1)*$this->rowLimit),
+ ($page*$this->rowLimit),
$this->rowLimit, $this->sortArray[0],
$this->sortArray[1]);
if (PEAR::isError($recordSet)) {
@@ -147,4 +148,4 @@
}
-?>
\ No newline at end of file
+?>