cvs: pear /DB_DataObject/DataObject Generator.php
| From: | Alan Knowles | Date: | Mon, 26 Feb 2007 02:14:07 +0000 |
| Subject: | cvs: pear /DB_DataObject/DataObject Generator.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-44882@lists.php.net to get a copy of this message | ||
alan_k Mon Feb 26 02:14:07 2007 UTC
Modified files:
/pear/DB_DataObject/DataObject Generator.php
Log:
fix bug #10112 - quote_identifiers honoured by getTableInfo in generator
http://cvs.php.net/viewvc.cgi/pear/DB_DataObject/DataObject/Generator.php?r1=1.128&r2=1.129&diff_format=u
Index: pear/DB_DataObject/DataObject/Generator.php
diff -u pear/DB_DataObject/DataObject/Generator.php:1.128
pear/DB_DataObject/DataObject/Generator.php:1.129
--- pear/DB_DataObject/DataObject/Generator.php:1.128 Tue Jan 16 03:08:39 2007
+++ pear/DB_DataObject/DataObject/Generator.php Mon Feb 26 02:14:06 2007
@@ -15,7 +15,7 @@
* @author Alan Knowles <alan@akbkhome.com>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License 3.0
- * @version CVS: $Id: Generator.php,v 1.128 2007/01/16 03:08:39 alan_k Exp $
+ * @version CVS: $Id: Generator.php,v 1.129 2007/02/26 02:14:06 alan_k Exp $
* @link http://pear.php.net/package/DB_DataObject
*/
@@ -256,10 +256,14 @@
$table = $bits[1];
}
}
+ $quotedTable = !empty($options['quote_identifiers']) ?
+ $__DB->quoteIdentifier($table) : $table;
+
if (!$is_MDB2) {
- $defs = $__DB->tableInfo($table);
+
+ $defs = $__DB->tableInfo($quotedTable);
} else {
- $defs = $__DB->reverse->tableInfo($table);
+ $defs = $__DB->reverse->tableInfo($quotedTable);
// rename the length value, so it matches db's return.
foreach ($defs as $k => $v) {
$defs[$k]['len'] = $defs[$k]['length'];