[buddypress-trac] [BuddyPress] #4337: bp_blogs_record_existing_blogs() is not network-aware

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Jul 10 14:29:15 UTC 2012


#4337: bp_blogs_record_existing_blogs() is not network-aware
--------------------------+---------------------------------
 Reporter:  boonebgorges  |      Owner:  boonebgorges
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Future Release
Component:  Blogs         |    Version:  1.5.1
 Severity:  normal        |   Keywords:  1.7-early 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}'" ) );
 }}}

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4337>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list