WordPress.org

Make WordPress Core

Ticket #20950: missing-cache-delete.2.diff

File missing-cache-delete.2.diff, 991 bytes (added by wonderboymusic, 19 months ago)
  • wp-includes/ms-blogs.php

     
    246246 * @param int $blog_id Blog ID 
    247247 */ 
    248248function refresh_blog_details( $blog_id ) { 
     249        global $wpdb; 
    249250        $blog_id = (int) $blog_id; 
    250251        $details = get_blog_details( $blog_id, false ); 
    251252 
    252253        wp_cache_delete( $blog_id , 'blog-details' ); 
    253254        wp_cache_delete( $blog_id . 'short' , 'blog-details' ); 
    254         wp_cache_delete( md5( $details->domain . $details->path )  , 'blog-lookup' ); 
     255        wp_cache_delete( md5( $wpdb->escape( $details->domain ) . $wpdb->escape( $details->path ) )  , 'blog-lookup' ); 
    255256        wp_cache_delete( 'current_blog_' . $details->domain, 'site-options' ); 
    256257        wp_cache_delete( 'current_blog_' . $details->domain . $details->path, 'site-options' ); 
     258        wp_cache_delete( 'get_id_from_blogname_' . $details->blogname, 'blog-details' ); 
    257259 
    258260        do_action( 'refresh_blog_details', $blog_id ); 
    259261}