Ticket #8014: 8014.001.diff
| File 8014.001.diff, 1.1 KB (added by AaronCampbell, 4 years ago) |
|---|
-
trunk/wp-admin/includes/upgrade.php
2 2 /** 3 3 * WordPress Upgrade API 4 4 * 5 * Most of the functions are pluggable and can be overwritten 5 * Most of the functions are pluggable and can be overwritten 6 6 * 7 7 * @package WordPress 8 8 * @subpackage Administration … … 1119 1119 // Create a tablename index for an array ($cqueries) of queries 1120 1120 foreach($queries as $qry) { 1121 1121 if(preg_match("|CREATE TABLE ([^ ]*)|", $qry, $matches)) { 1122 $cqueries[ strtolower($matches[1])] = $qry;1122 $cqueries[trim(strtolower($matches[1]), '`')] = $qry; 1123 1123 $for_update[$matches[1]] = 'Created table '.$matches[1]; 1124 1124 } 1125 1125 else if(preg_match("|CREATE DATABASE ([^ ]*)|", $qry, $matches)) { … … 1158 1158 foreach($flds as $fld) { 1159 1159 // Extract the field name 1160 1160 preg_match("|^([^ ]*)|", trim($fld), $fvals); 1161 $fieldname = $fvals[1];1161 $fieldname = trim($fvals[1], '`'); 1162 1162 1163 1163 // Verify the found field name 1164 1164 $validfield = true;
