Skip to:
Content

BuddyPress.org

Ticket #2369: 2369.diff

File 2369.diff, 969 bytes (added by wpmuguru, 14 years ago)
  • bp-blogs.php

     
    295295}
    296296
    297297function bp_blogs_record_existing_blogs() {
    298         global $bp, $wpdb;
     298        global $bp, $wpdb, $current_site;
    299299
    300300        /* Truncate user blogs table and re-record. */
    301301        $wpdb->query( "TRUNCATE TABLE {$bp->blogs->table_name}" );
    302302
    303         $blog_ids = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0" ) );
     303        $blog_ids = $wpdb->get_col( $wpdb->prepare( "SELECT blog_id FROM {$wpdb->base_prefix}blogs WHERE mature = 0 AND spam = 0 AND deleted = 0 AND site_id = %d", $current_site->id ) );
    304304
    305305        if ( $blog_ids ) {
    306306                foreach( (array)$blog_ids as $blog_id ) {
     
    747747add_action( 'bp_blogs_new_blog', 'bp_core_clear_cache' );
    748748add_action( 'bp_blogs_remove_data', 'bp_core_clear_cache' );
    749749
    750 ?>
    751  No newline at end of file
     750?>