mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-09-27 13:30:54 +02:00
Make data type conversion case-insensitive
Data types are not case-sensitive, and the current data type conversion assumes that the types are all lower-case. Although this is currently the case for most (all?) of the Wordpress core, it is not the case for all extensions (e.g. nextgen-gallery). Make data type conversion case-insensitive. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
This commit is contained in:
@@ -129,7 +129,7 @@ WHERE '.$where : '').';';
|
|||||||
$table = $matches[1];
|
$table = $matches[1];
|
||||||
$col = $matches[2];
|
$col = $matches[2];
|
||||||
$newname = $matches[3];
|
$newname = $matches[3];
|
||||||
$type = $matches[4];
|
$type = strtolower($matches[4]);
|
||||||
if( isset($GLOBALS['pg4wp_ttr'][$type]))
|
if( isset($GLOBALS['pg4wp_ttr'][$type]))
|
||||||
$type = $GLOBALS['pg4wp_ttr'][$type];
|
$type = $GLOBALS['pg4wp_ttr'][$type];
|
||||||
$unsigned = $matches[5];
|
$unsigned = $matches[5];
|
||||||
@@ -159,7 +159,7 @@ WHERE '.$where : '').';';
|
|||||||
{
|
{
|
||||||
$table = $matches[1];
|
$table = $matches[1];
|
||||||
$col = $matches[2];
|
$col = $matches[2];
|
||||||
$type = $matches[3];
|
$type = strtolower($matches[3]);
|
||||||
if( isset($GLOBALS['pg4wp_ttr'][$type]))
|
if( isset($GLOBALS['pg4wp_ttr'][$type]))
|
||||||
$type = $GLOBALS['pg4wp_ttr'][$type];
|
$type = $GLOBALS['pg4wp_ttr'][$type];
|
||||||
$unsigned = $matches[4];
|
$unsigned = $matches[4];
|
||||||
|
Reference in New Issue
Block a user