cvs: pear /MDB2/MDB2/Driver/Reverse mysql.php
| From: | Lukas Smith | Date: | Sat, 04 Sep 2004 22:14:15 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver/Reverse mysql.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-23626@lists.php.net to get a copy of this message | ||
lsmith Sat Sep 4 18:14:15 2004 EDT
Modified files:
/pear/MDB2/MDB2/Driver/Reverse mysql.php
Log:
- improved handling of MDB2_PORTABILITY_LOWERCASE in all the reverse
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/Reverse/mysql.php?r1=1.16&r2=1.17&ty=u
Index: pear/MDB2/MDB2/Driver/Reverse/mysql.php
diff -u pear/MDB2/MDB2/Driver/Reverse/mysql.php:1.16 pear/MDB2/MDB2/Driver/Reverse/mysql.php:1.17
--- pear/MDB2/MDB2/Driver/Reverse/mysql.php:1.16 Fri Aug 6 11:25:07 2004
+++ pear/MDB2/MDB2/Driver/Reverse/mysql.php Sat Sep 4 18:14:12 2004
@@ -42,7 +42,7 @@
// | Author: Lukas Smith <smith@backendmedia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: mysql.php,v 1.16 2004/08/06 15:25:07 lsmith Exp $
+// $Id: mysql.php,v 1.17 2004/09/04 22:14:12 lsmith Exp $
//
require_once 'MDB2/Driver/Reverse/Common.php';
@@ -292,11 +292,17 @@
$row = array_change_key_case($row, CASE_LOWER);
}
$key_name = $row['key_name'];
+ if ($db->options['portability'] & MDB2_PORTABILITY_LOWERCASE) {
+ $key_name = strtolower($key_name);
+ }
if ($index_name == $key_name) {
if (!$row['non_unique']) {
$definition['unique'] = true;
}
$column_name = $row['column_name'];
+ if ($db->options['portability'] & MDB2_PORTABILITY_LOWERCASE) {
+ $column_name = strtolower($column_name);
+ }
$definition['fields'][$column_name] = array();
if (isset($row['collation'])) {
$definition['fields'][$column_name]['sorting'] =
($row['collation'] == 'A' ? 'ascending' : 'descending');