Do not force table names to be lowercase in dbDelta, as this breaks sites using capital letters in table prefixes. props netweblogic. fixes #19748.

git-svn-id: http://core.svn.wordpress.org/trunk@20704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-05-02 21:19:37 +00:00
parent 296a97f566
commit c64ed056ac

View File

@ -1512,7 +1512,7 @@ function dbDelta( $queries = '', $execute = true ) {
// Create a tablename index for an array ($cqueries) of queries
foreach($queries as $qry) {
if (preg_match("|CREATE TABLE ([^ ]*)|", $qry, $matches)) {
$cqueries[trim( strtolower($matches[1]), '`' )] = $qry;
$cqueries[ trim( $matches[1], '`' ) ] = $qry;
$for_update[$matches[1]] = 'Created table '.$matches[1];
} else if (preg_match("|CREATE DATABASE ([^ ]*)|", $qry, $matches)) {
array_unshift($cqueries, $qry);