cvs: pear /HTML_Table/Table Storage.php

From: Date: Tue, 25 Oct 2005 11:50:52 +0000
Subject: cvs: pear /HTML_Table/Table Storage.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35844@lists.php.net to get a copy of this message
wiesemann Tue Oct 25 07:50:52 2005 EDT Modified files: /pear/HTML_Table/Table Storage.php Log: Bugfix: addCol() had the same problem as in request #4988 (it did not accept array keys as row numbers) http://cvs.php.net/diff.php/pear/HTML_Table/Table/Storage.php?r1=1.3&r2=1.4&ty=u Index: pear/HTML_Table/Table/Storage.php diff -u pear/HTML_Table/Table/Storage.php:1.3 pear/HTML_Table/Table/Storage.php:1.4 --- pear/HTML_Table/Table/Storage.php:1.3 Fri Oct 21 03:59:04 2005 +++ pear/HTML_Table/Table/Storage.php Tue Oct 25 07:50:51 2005 @@ -22,7 +22,7 @@ * @author Bertrand Mansion <bmansion@mamasam.com> * @copyright 2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Storage.php,v 1.3 2005/10/21 07:59:04 wiesemann Exp $ + * @version CVS: $Id: Storage.php,v 1.4 2005/10/25 11:50:51 wiesemann Exp $ * @link http://pear.php.net/package/HTML_Table */ @@ -541,9 +541,12 @@ } $type = strtolower($type); $col = $this->_cols++; - $contentCount = count($contents); - for ($counter = 0; $counter < $contentCount; $counter++) { - $this->setCellContents($counter, $col, $contents[$counter], $type); + foreach ($contents as $row => $content) { + if ($type == 'td') { + $this->setCellContents($row, $col, $content); + } elseif ($type == 'th') { + $this->setHeaderContents($row, $col, $content); + } } $this->setColAttributes($col, $attributes); return $col;

« previous php.pear.cvs (#35844) next »