Ticket #627: patch.patch
File patch.patch, 2.1 KB (added by , 16 years ago) |
---|
-
bp-core.php
16 16 /* Place your custom code (actions/filters) in a file called bp-custom.php and it will be loaded before anything else. */ 17 17 if ( file_exists( WPMU_PLUGIN_DIR . '/bp-custom.php' ) ) 18 18 require( WPMU_PLUGIN_DIR . '/bp-custom.php' ); 19 20 /* On which blog BuddyPress runs */ 21 define( 'BP_ROOT_BLOG', apply_filters( 'bp_root_blog', 3 ) ); 19 22 20 23 /* Load the language file */ 21 24 if ( file_exists( WPMU_PLUGIN_DIR . '/bp-languages/buddypress-' . get_locale() . '.mo' ) ) … … 73 76 global $action_variables; 74 77 75 78 $current_user = wp_get_current_user(); 79 80 /* The blog id of the BuddyPress installation */ 81 $bp->root_id = BP_ROOT_BLOG; 76 82 77 83 /* The domain for the root of the site where the main blog resides */ 78 84 $bp->root_domain = bp_core_get_root_domain(); … … 356 362 * @return $domain The domain URL for the blog. 357 363 */ 358 364 function bp_core_get_root_domain() { 359 switch_to_blog( 1);365 switch_to_blog(BP_ROOT_BLOG); 360 366 $domain = site_url(); 361 367 restore_current_blog(); 362 368 … … 658 664 global $userdata; 659 665 660 666 if ( $uid == $userdata->ID ) 661 return 'You';667 return __( 'You', 'buddypress' ); 662 668 663 669 if ( !$ud = get_userdata($uid) ) 664 670 return false; … … 1089 1095 * @uses bp_core_get_userlink_by_email() Fetches a userlink via email address. 1090 1096 */ 1091 1097 function bp_core_get_site_path() { 1092 global $ wpdb;1098 global $current_site; 1093 1099 1094 return $ wpdb->get_var( $wpdb->prepare( "SELECT path FROM {$wpdb->base_prefix}site WHERE id = 1") );1100 return $current_site->path; 1095 1101 } 1096 1102 1097 1103 function bp_core_redirect( $location, $status = 302 ) { -
bp-core/bp-core-catchuri.php
33 33 global $bp, $current_blog; 34 34 35 35 /* 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 ) 37 37 return false; 38 38 39 39 if ( strpos( $_SERVER['REQUEST_URI'], 'bp-core-ajax-handler.php' ) )