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:
Kevin Locke
2015-06-06 21:14:11 -06:00
parent 67d7129b99
commit 50c091946c

View File

@@ -129,7 +129,7 @@ WHERE '.$where : '').';';
$table = $matches[1];
$col = $matches[2];
$newname = $matches[3];
$type = $matches[4];
$type = strtolower($matches[4]);
if( isset($GLOBALS['pg4wp_ttr'][$type]))
$type = $GLOBALS['pg4wp_ttr'][$type];
$unsigned = $matches[5];
@@ -159,7 +159,7 @@ WHERE '.$where : '').';';
{
$table = $matches[1];
$col = $matches[2];
$type = $matches[3];
$type = strtolower($matches[3]);
if( isset($GLOBALS['pg4wp_ttr'][$type]))
$type = $GLOBALS['pg4wp_ttr'][$type];
$unsigned = $matches[4];