Skip to:

Opened 12 years ago

Closed 12 years ago

#4337 closed defect (bug) (fixed)

bp_blogs_record_existing_blogs() is not network-aware

Reported by: boonebgorges's profile boonebgorges Owned by: boonebgorges's profile boonebgorges
Milestone: 1.7 Priority: normal
Severity: minor Version: 1.5.1
Component: Blogs Keywords: has-patch


When running a BP Multi Network setup, bp_blogs_record_existing_blogs() incorrectly records all blogs from the entire installation, regardless of site_id. This breaks multi-network setups, since all sites show on all site directories.

The answer is to change the blogs query to:

$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 = '{$wpdb->siteid}'" ) );

Change History (3)

#1 @boonebgorges
12 years ago

  • Keywords 1.7-early removed
  • Milestone changed from Future Release to 1.7
  • Severity changed from normal to minor

#2 @johnjamesjacoby
12 years ago

This looks good to me.

#3 @johnjamesjacoby
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6299]) Blogs:

  • Only populate blogs table with blogs from the current site_id.
  • Fixes issues with multi-network installations.
  • Props boonebgorges.
  • Fixes #4337.
Note: See TracTickets for help on using tickets.