Skip to:
Content

BuddyPress.org

Ticket #175: sitewide.patch

File sitewide.patch, 838 bytes (added by burtadsit, 16 years ago)

fix for sitewide recent blog posts when donncha's plugin is active

  • bp-blogs.php

     
    383383add_action( 'wpmu_new_blog', 'bp_blogs_record_blog', 10, 2 );
    384384
    385385function bp_blogs_record_post( $post_id, $blog_id = false, $user_id = false ) {
    386         global $bp, $current_blog;
    387        
     386        global $bp, $wpdb;
     387
    388388        if ( !$bp ) {
    389389                bp_core_setup_globals();
    390390                bp_blogs_setup_globals();
     
    392392       
    393393        $post_id = (int)$post_id;
    394394        $post = get_post($post_id);
    395        
     395
    396396        if ( !$user_id )
    397397                $user_id = (int)$post->post_author;
    398398               
    399399        if ( !$blog_id )
    400                 $blog_id = (int)$current_blog->blog_id;
     400                $blog_id = (int)$wpdb->blogid;
    401401
    402402        /* This is to stop infinate loops with Donncha's sitewide tags plugin */
    403403        if ( (int)get_site_option('tags_blog_id') == (int)$blog_id )