X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/baca9ce86a38dc54c4574890ee2d352fd81f78b2..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-admin/includes/ms.php diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index b62e1d0b..bba4adbe 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -80,7 +80,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) { $drop = false; if ( $drop ) { - $drop_tables = apply_filters( 'wpmu_drop_tables', $wpdb->tables( 'blog' ) ); + $drop_tables = apply_filters( 'wpmu_drop_tables', $wpdb->tables( 'blog' ), $blog_id ); foreach ( (array) $drop_tables as $table ) { $wpdb->query( "DROP TABLE IF EXISTS `$table`" ); @@ -135,6 +135,9 @@ function wpmu_delete_user( $id ) { $id = (int) $id; $user = new WP_User( $id ); + if ( !$user->exists() ) + return false; + do_action( 'wpmu_delete_user', $id ); $blogs = get_blogs_of_user( $id ); @@ -368,7 +371,7 @@ function update_user_status( $id, $pref, $value, $deprecated = null ) { if ( null !== $deprecated ) _deprecated_argument( __FUNCTION__, '3.1' ); - $wpdb->update( $wpdb->users, array( $pref => $value ), array( 'ID' => $id ) ); + $wpdb->update( $wpdb->users, array( sanitize_key( $pref ) => $value ), array( 'ID' => $id ) ); $user = new WP_User( $id ); clean_user_cache( $user ); @@ -525,7 +528,7 @@ function site_admin_notice() { if ( !is_super_admin() ) return false; if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version ) - echo "
" . sprintf( __( 'Thank you for Updating! Please visit the Update Network page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ) . "
"; + echo "
" . sprintf( __( 'Thank you for Updating! Please visit the Upgrade Network page to update all your sites.' ), esc_url( network_admin_url( 'upgrade.php' ) ) ) . "
"; } add_action( 'admin_notices', 'site_admin_notice' ); add_action( 'network_admin_notices', 'site_admin_notice' ); @@ -692,23 +695,3 @@ var tb_pathToImage = "../../wp-includes/js/thickbox/loadingAnimation.gif"; 10000, 'users', $count ); - } - - $count = get_blog_count(); - return apply_filters( 'wp_is_large_network', $count > 10000, 'sites', $count ); -}