mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
WPDB: get_table_from_query()
didn't find table names with hyphens in them.
Props dustinbolton for the fix. Fixes #33470. Built from https://develop.svn.wordpress.org/trunk@33718 git-svn-id: http://core.svn.wordpress.org/trunk@33685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
45578c525e
commit
eb99787e32
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-33717';
|
||||
$wp_version = '4.4-alpha-33718';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
@ -2870,7 +2870,7 @@ class wpdb {
|
||||
. '|REPLACE(?:\s+LOW_PRIORITY|\s+DELAYED)?(?:\s+INTO)?'
|
||||
. '|UPDATE(?:\s+LOW_PRIORITY)?(?:\s+IGNORE)?'
|
||||
. '|DELETE(?:\s+LOW_PRIORITY|\s+QUICK|\s+IGNORE)*(?:\s+FROM)?'
|
||||
. ')\s+((?:[0-9a-zA-Z$_.`]|[\xC2-\xDF][\x80-\xBF])+)/is', $query, $maybe ) ) {
|
||||
. ')\s+((?:[0-9a-zA-Z$_.`-]|[\xC2-\xDF][\x80-\xBF])+)/is', $query, $maybe ) ) {
|
||||
return str_replace( '`', '', $maybe[1] );
|
||||
}
|
||||
|
||||
@ -2878,7 +2878,7 @@ class wpdb {
|
||||
if ( preg_match( '/^\s*(?:'
|
||||
. 'SHOW\s+TABLE\s+STATUS.+(?:LIKE\s+|WHERE\s+Name\s*=\s*)'
|
||||
. '|SHOW\s+(?:FULL\s+)?TABLES.+(?:LIKE\s+|WHERE\s+Name\s*=\s*)'
|
||||
. ')\W((?:[0-9a-zA-Z$_.`]|[\xC2-\xDF][\x80-\xBF])+)\W/is', $query, $maybe ) ) {
|
||||
. ')\W((?:[0-9a-zA-Z$_.`-]|[\xC2-\xDF][\x80-\xBF])+)\W/is', $query, $maybe ) ) {
|
||||
return str_replace( '`', '', $maybe[1] );
|
||||
}
|
||||
|
||||
@ -2897,7 +2897,7 @@ class wpdb {
|
||||
. '|LOAD\s+DATA.*INFILE.*INTO\s+TABLE'
|
||||
. '|(?:GRANT|REVOKE).*ON\s+TABLE'
|
||||
. '|SHOW\s+(?:.*FROM|.*TABLE)'
|
||||
. ')\s+\(*\s*((?:[0-9a-zA-Z$_.`]|[\xC2-\xDF][\x80-\xBF])+)\s*\)*/is', $query, $maybe ) ) {
|
||||
. ')\s+\(*\s*((?:[0-9a-zA-Z$_.`-]|[\xC2-\xDF][\x80-\xBF])+)\s*\)*/is', $query, $maybe ) ) {
|
||||
return str_replace( '`', '', $maybe[1] );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user