cvs: pear /Structures_DataGrid/DataGrid/Renderer HTMLTable.php
| From: | Andrew Nagy | Date: | Fri, 11 Mar 2005 23:08:00 +0000 |
| Subject: | cvs: pear /Structures_DataGrid/DataGrid/Renderer HTMLTable.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-30226@lists.php.net to get a copy of this message | ||
asnagy Fri Mar 11 18:08:00 2005 EDT
Modified files:
/pear/Structures_DataGrid/DataGrid/Renderer HTMLTable.php
Log:
Accident Checkin, Reverted to 1.40
http://cvs.php.net/diff.php/pear/Structures_DataGrid/DataGrid/Renderer/HTMLTable.php?r1=1.41&r2=1.42&ty=u
Index: pear/Structures_DataGrid/DataGrid/Renderer/HTMLTable.php
diff -u pear/Structures_DataGrid/DataGrid/Renderer/HTMLTable.php:1.41
pear/Structures_DataGrid/DataGrid/Renderer/HTMLTable.php:1.42
--- pear/Structures_DataGrid/DataGrid/Renderer/HTMLTable.php:1.41 Fri Mar 11 18:01:05 2005
+++ pear/Structures_DataGrid/DataGrid/Renderer/HTMLTable.php Fri Mar 11 18:08:00 2005
@@ -16,14 +16,14 @@
// | Author: Andrew Nagy <asnagy@webitecture.org> |
// +----------------------------------------------------------------------+
//
-// $Id: HTMLTable.php,v 1.41 2005/03/11 23:01:05 asnagy Exp $
+// $Id: HTMLTable.php,v 1.42 2005/03/11 23:08:00 asnagy Exp $
require_once 'HTML/Table.php';
/**
* Structures_DataGrid_Renderer_HTMLTable Class
*
- * @version $Revision: 1.41 $
+ * @version $Revision: 1.42 $
* @author Andrew S. Nagy <asnagy@webitecture.org>
* @access public
* @package Structures_DataGrid
@@ -435,7 +435,7 @@
}
} else {
// Use Record Data
- $content = htmlentities(stripslashes($row[$column->fieldName]));
+ $content = $row[$column->fieldName];
if (($content == '') &&
($column->autoFillValue != '')) {
@@ -496,36 +496,12 @@
if (is_array($attrs)) {
$options = array_merge($options, $attrs);
}
-
- if ($mode == 'Alpha') {
- $this->_buildAlphaPaging($options);
- } else {
- $this->_buildNumericPaging($options);
- }
+ $this->_buildPaging($options);
// Return paging html
return $this->pager->links;
}
- function _buildAlphaPaging($options)
- {
- // This needs to be defined;
- $pagedColumn = 'title';
-
- $letters = array();
- foreach ($this->_dg->recordSet as $record) {
- $letters[] = substr(trim($record[$pagedColumn]), 0, 1);
- }
- $letters = array_unique($letters);
-
- // Build HTML
- foreach ($letters as $letter) {
- $html .= "<a href=\"?page=$letter\">$letter</a> " .
$options['separator'] . ' ';
- }
- $this->pager = new Pager();
- $this->pager->links = $html;
- }
-
/**
* Handles generating the paging object
@@ -534,7 +510,7 @@
* @access private
* @return void
*/
- function _buildNumericPaging($options)
+ function _buildPaging($options)
{
if ($this->_dg->_dataSource != null) {
$count = $this->_dg->_dataSource->count();
@@ -551,4 +527,4 @@
}
-?>
+?>
\ No newline at end of file