mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
escape the trailing underscore in SHOW TABLES LIKE in delete_blog, fixes #13099
git-svn-id: https://develop.svn.wordpress.org/trunk@14215 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -77,6 +77,9 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
|
||||
update_blog_status( $blog_id, 'deleted', 1 );
|
||||
|
||||
if ( $drop ) {
|
||||
if ( substr( $blog_prefix, -1 ) == '_' )
|
||||
$blog_prefix = substr( $blog_prefix, 0, -1 ) . '\_';
|
||||
|
||||
$drop_tables = $wpdb->get_results( "SHOW TABLES LIKE '{$blog_prefix}%'", ARRAY_A );
|
||||
$drop_tables = apply_filters( 'wpmu_drop_tables', $drop_tables );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user