Skip to:
Content

BuddyPress.org

Changeset 1267


Ignore:
Timestamp:
03/26/2009 03:11:09 PM (17 years ago)
Author:
apeatling
Message:

Fixes #627 props GIGALinux.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r1262 r1267  
    1717if ( file_exists( WPMU_PLUGIN_DIR . '/bp-custom.php' ) )
    1818        require( WPMU_PLUGIN_DIR . '/bp-custom.php' );
     19
     20/* Define on which blog ID BuddyPress should run */
     21define( 'BP_ROOT_BLOG', apply_filters( 'bp_root_blog', 1 ) );
    1922
    2023/* Load the language file */
     
    357360 */
    358361function bp_core_get_root_domain() {
    359         switch_to_blog(1);
     362        switch_to_blog(BP_ROOT_BLOG);
    360363        $domain = site_url();
    361364        restore_current_blog();
     
    659662       
    660663        if ( $uid == $userdata->ID )
    661                 return 'You';
     664                return __( 'You', 'buddypress' );
    662665       
    663666        if ( !$ud = get_userdata($uid) )
     
    10901093 */
    10911094function bp_core_get_site_path() {
    1092         global $wpdb;
    1093        
    1094         return $wpdb->get_var( $wpdb->prepare( "SELECT path FROM {$wpdb->base_prefix}site WHERE id = 1") );
     1095        global $current_site;
     1096       
     1097        return $current_site->path;
    10951098}
    10961099
  • trunk/bp-core/bp-core-catchuri.php

    r1254 r1267  
    3434       
    3535        /* Only catch URI's on the root blog */
    36         if ( 1 != (int) $current_blog->blog_id )
     36        if ( BP_ROOT_BLOG != (int) $current_blog->blog_id )
    3737                return false;
    3838       
Note: See TracChangeset for help on using the changeset viewer.