cvs: pear /Structures_DataGrid/DataGrid/DataSource XML.php /Structures_DataGrid/DataGrid/Renderer Smarty.php
[email protected] ("Olivier Guilyardi") Sat, 10 May 2008 15:08:26 -0000
| Newsgroups | php.pear.cvs |
|---|---|
| Message-ID | <cvsolivierg1210432106@cvsserver> |
olivierg Sat May 10 15:08:26 2008 UTC
Modified files:
/pear/Structures_DataGrid/DataGrid/DataSource XML.php
/pear/Structures_DataGrid/DataGrid/Renderer Smarty.php
Log:
fix/add comments
http://cvs.php.net/viewvc.cgi/pear/Structures_DataGrid/DataGrid/DataSource/XML.php?r1=1.21&r2=1.22&diff_format=u
Index: pear/Structures_DataGrid/DataGrid/DataSource/XML.php
diff -u pear/Structures_DataGrid/DataGrid/DataSource/XML.php:1.21 pear/Structures_DataGrid/DataGrid/DataSource/XML.php:1.22
--- pear/Structures_DataGrid/DataGrid/DataSource/XML.php:1.21 Sun Jul 22 14:45:27 2007
+++ pear/Structures_DataGrid/DataGrid/DataSource/XML.php Sat May 10 15:08:26 2008
@@ -35,9 +35,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * CSV file id: $Id: XML.php,v 1.21 2007/07/22 14:45:27 wiesemann Exp $
+ * CSV file id: $Id: XML.php,v 1.22 2008/05/10 15:08:26 olivierg Exp $
*
- * @version $Revision: 1.21 $
+ * @version $Revision: 1.22 $
* @category Structures
* @package Structures_DataGrid_DataSource_XML
* @license http://opensource.org/licenses/bsd-license.php New BSD License
@@ -68,7 +68,7 @@
* @author Olivier Guilyardi <[email protected]>
* @author Mark Wiesemann <[email protected]>
* @category Structures
- * @version $Revision: 1.21 $
+ * @version $Revision: 1.22 $
*/
class Structures_DataGrid_DataSource_XML extends
Structures_DataGrid_DataSource_Array
@@ -241,7 +241,7 @@
// build a simple array
list($junk, $data) = each($data); // TODO: check $data here
// check the array, can it be parsed?
- if (!is_array($data)) {
+ if (!is_array($data)) { // FIXME: fails with 1 row of data
return PEAR::raiseError('Unable to bind the XML data. ' .
'You may want to set the ' .
'\'xpath\' option.');
http://cvs.php.net/viewvc.cgi/pear/Structures_DataGrid/DataGrid/Renderer/Smarty.php?r1=1.57&r2=1.58&diff_format=u
Index: pear/Structures_DataGrid/DataGrid/Renderer/Smarty.php
diff -u pear/Structures_DataGrid/DataGrid/Renderer/Smarty.php:1.57 pear/Structures_DataGrid/DataGrid/Renderer/Smarty.php:1.58
--- pear/Structures_DataGrid/DataGrid/Renderer/Smarty.php:1.57 Wed Dec 5 12:42:32 2007
+++ pear/Structures_DataGrid/DataGrid/Renderer/Smarty.php Sat May 10 15:08:26 2008
@@ -36,9 +36,9 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * CVS file id: $Id: Smarty.php,v 1.57 2007/12/05 12:42:32 olivierg Exp $
+ * CVS file id: $Id: Smarty.php,v 1.58 2008/05/10 15:08:26 olivierg Exp $
*
- * @version $Revision: 1.57 $
+ * @version $Revision: 1.58 $
* @package Structures_DataGrid_Renderer_Smarty
* @category Structures
* @license http://opensource.org/licenses/bsd-license.php New BSD License
@@ -134,7 +134,7 @@
* records, you can access their properties and methods in your smarty template,
* with something like: {$recordSet[col]->getSomeInformation()}.
*
- * @version $Revision: 1.57 $
+ * @version $Revision: 1.58 $
* @example smarty-simple.php Using the Smarty renderer
* @example smarty-simple.tpl Smarty template with sorting and paging (smarty-simple.tpl)
* @author Andrew S. Nagy <[email protected]>
@@ -316,12 +316,13 @@
if ($this->_options['associative']) {
$associative = array();
foreach ($this->_records as $row => $rec) {
- if (is_array($rec)) { // object records are left untouched
+ if (is_array($rec)) {
$associative[$row] = array();
foreach ($this->_columns as $col => $spec) {
$associative[$row][$spec['field']] = $rec[$col];
}
} else {
+ // object records are left untouched
$associative[$row] =& $this->_records[$row];
}
}