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:
Ron Rennick 2010-04-24 04:15:00 +00:00
parent 75b0dcde46
commit 310a7bcf05
1 changed files with 3 additions and 0 deletions

View File

@ -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 );