PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Structures » Structures_DataGrid » Bug #6522

Fix to determine proper row count instead of guessing

Details

Request #6522Fix to determine proper row count instead of guessing
Submitted2006-01-18 20:10 UTC
Fromjason at greenhell dot com
Assignedwiesemann
StatusWont fix
PackageStructures_DataGrid
PHP Version5.1.0
OSLinux
Roadmaps(Not assigned)

Comments

[2006-01-18 20:10 UTC] jason at greenhell dot com

Description:
------------
In Renderer/HTMLTable.php line 437, there exists the following line in the _buildHTMLTableBody() method:

// Begin loop
$rowCnt = ($this->header) ? 1 : 0;

The above line attempts to determine the number of rows currently existing in the renderer's HTMLTable instance.

There is a problem with this if you wish to alter the HTMLTable instance explicitly adding rows, etc. Instead of guessing what the row count is, it could know this for sure by using the following method:

$rowCnt = $this->_table->getRowCount();

Then, the row count is always known, regardless of any manipulation of the HTMLTable instance that may have been done.

I can give a concrete example of this is problem, if required.