From b128d68f11efae892a34dc7d0da04d0633770200 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 2 May 2012 21:19:37 +0000 Subject: [PATCH] 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: https://develop.svn.wordpress.org/trunk@20704 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index e3cb2d58ea..bb69d9a077 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -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);