<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][4107] trunk: Audit of the use of -&gt;blog_id to change to -&gt;blogid where possible, to better account for switch_to_blog() use.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd>4107</dd>
<dt>Author</dt> <dd>boonebgorges</dd>
<dt>Date</dt> <dd>2011-03-11 18:02:47 +0000 (Fri, 11 Mar 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Audit of the use of -&gt;blog_id to change to -&gt;blogid where possible, to better account for switch_to_blog() use. Fixes #2984. Props wpmuguru</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpblogsbpblogsfunctionsphp">trunk/bp-blogs/bp-blogs-functions.php</a></li>
<li><a href="#trunkbpblogsbpblogswidgetsphp">trunk/bp-blogs/bp-blogs-widgets.php</a></li>
<li><a href="#trunkbpcoreadminbpcoreadminphp">trunk/bp-core/admin/bp-core-admin.php</a></li>
<li><a href="#trunkbpcoreadminbpcoreupdatephp">trunk/bp-core/admin/bp-core-update.php</a></li>
<li><a href="#trunkbpcorebpcoreavatarsphp">trunk/bp-core/bp-core-avatars.php</a></li>
<li><a href="#trunkbpcorebpcorecatchuriphp">trunk/bp-core/bp-core-catchuri.php</a></li>
<li><a href="#trunkbpcorebpcorecssjsphp">trunk/bp-core/bp-core-cssjs.php</a></li>
<li><a href="#trunkbpcorebpcorefiltersphp">trunk/bp-core/bp-core-filters.php</a></li>
<li><a href="#trunkbpcorebpcorefunctionsphp">trunk/bp-core/bp-core-functions.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatephp">trunk/bp-core/bp-core-template.php</a></li>
<li><a href="#trunkbpmembersbpmembersbuddybarphp">trunk/bp-members/bp-members-buddybar.php</a></li>
<li><a href="#trunkbpmembersbpmemberstemplatephp">trunk/bp-members/bp-members-template.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpblogsbpblogsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-functions.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-functions.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-blogs/bp-blogs-functions.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -264,10 +264,10 @@
</span><span class="cx"> add_action( 'wp_set_comment_status', 'bp_blogs_manage_comment', 10, 2 );
</span><span class="cx"> 
</span><span class="cx"> function bp_blogs_add_user_to_blog( $user_id, $role = false, $blog_id = 0 ) {
</span><del>-        global $wpdb, $current_blog;
</del><ins>+        global $wpdb;
</ins><span class="cx"> 
</span><del>-        if ( empty( $blog_id ) &amp;&amp; isset( $current_blog ) )
-                $blog_id = $current_blog-&gt;blog_id;
</del><ins>+        if ( empty( $blog_id ) &amp;&amp; isset( $wpdb-&gt;blogid ) )
+                $blog_id = $wpdb-&gt;blogid;
</ins><span class="cx">         else
</span><span class="cx">                 $blog_id = BP_ROOT_BLOG;
</span><span class="cx"> 
</span><span class="lines">@@ -290,10 +290,10 @@
</span><span class="cx"> add_action( 'user_register',    'bp_blogs_add_user_to_blog'        );
</span><span class="cx"> 
</span><span class="cx"> function bp_blogs_remove_user_from_blog( $user_id, $blog_id = 0 ) {
</span><del>-        global $current_blog;
</del><ins>+        global $wpdb;
</ins><span class="cx"> 
</span><span class="cx">         if ( empty( $blog_id ) )
</span><del>-                $blog_id = $current_blog-&gt;blog_id;
</del><ins>+                $blog_id = $wpdb-&gt;blogid;
</ins><span class="cx"> 
</span><span class="cx">         bp_blogs_remove_blog_for_user( $user_id, $blog_id );
</span><span class="cx"> }
</span><span class="lines">@@ -329,15 +329,15 @@
</span><span class="cx"> add_action( 'remove_user_from_blog', 'bp_blogs_remove_blog_for_user', 10, 2 );
</span><span class="cx"> 
</span><span class="cx"> function bp_blogs_remove_post( $post_id, $blog_id = 0, $user_id = 0 ) {
</span><del>-        global $current_blog, $bp;
</del><ins>+        global $wpdb, $bp;
</ins><span class="cx"> 
</span><del>-        if ( empty( $current_blog-&gt;blog_id ) )
</del><ins>+        if ( empty( $wpdb-&gt;blogid ) )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         $post_id = (int)$post_id;
</span><span class="cx"> 
</span><span class="cx">         if ( !$blog_id )
</span><del>-                $blog_id = (int)$current_blog-&gt;blog_id;
</del><ins>+                $blog_id = (int)$wpdb-&gt;blogid;
</ins><span class="cx"> 
</span><span class="cx">         if ( !$user_id )
</span><span class="cx">                 $user_id = $bp-&gt;loggedin_user-&gt;id;
</span></span></pre></div>
<a id="trunkbpblogsbpblogswidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs/bp-blogs-widgets.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs/bp-blogs-widgets.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-blogs/bp-blogs-widgets.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -6,9 +6,9 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> function bp_blogs_register_widgets() {
</span><del>-        global $current_blog, $bp;
</del><ins>+        global $wpdb, $bp;
</ins><span class="cx"> 
</span><del>-        if ( bp_is_active( 'activity' ) &amp;&amp; (int)$current_blog-&gt;blog_id == BP_ROOT_BLOG )
</del><ins>+        if ( bp_is_active( 'activity' ) &amp;&amp; (int)$wpdb-&gt;blogid == BP_ROOT_BLOG )
</ins><span class="cx">                 add_action('widgets_init', create_function('', 'return register_widget(&quot;BP_Blogs_Recent_Posts_Widget&quot;);') );
</span><span class="cx"> }
</span><span class="cx"> add_action( 'bp_register_widgets', 'bp_blogs_register_widgets' );
</span></span></pre></div>
<a id="trunkbpcoreadminbpcoreadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-admin.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-admin.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-core/admin/bp-core-admin.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -18,7 +18,7 @@
</span><span class="cx">  * @package BuddyPress Core
</span><span class="cx">  */
</span><span class="cx"> function bp_core_activation_notice() {
</span><del>-        global $wp_rewrite, $current_blog, $bp;
</del><ins>+        global $wp_rewrite, $wpdb, $bp;
</ins><span class="cx"> 
</span><span class="cx">         if ( isset( $_POST['permalink_structure'] ) )
</span><span class="cx">                 return false;
</span><span class="lines">@@ -26,8 +26,8 @@
</span><span class="cx">         if ( !is_super_admin() )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        if ( !empty( $current_blog ) ) {
-                if ( $current_blog-&gt;blog_id != BP_ROOT_BLOG ) {
</del><ins>+        if ( !empty( $wpdb-&gt;blogid ) ) {
+                if ( $wpdb-&gt;blogid != BP_ROOT_BLOG ) {
</ins><span class="cx">                         return false;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -90,7 +90,7 @@
</span><span class="cx">  * @since {@internal Unknown}}
</span><span class="cx">  */
</span><span class="cx"> function bp_core_admin_settings() {
</span><del>-        global $wpdb, $bp, $current_blog;
</del><ins>+        global $wpdb, $bp;
</ins><span class="cx"> 
</span><span class="cx">         $ud = get_userdata( $bp-&gt;loggedin_user-&gt;id );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcoreadminbpcoreupdatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/admin/bp-core-update.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/admin/bp-core-update.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-core/admin/bp-core-update.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -739,7 +739,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function step_ms_update_save() {
</span><del>-                global $current_blog;
</del><ins>+                global $wpdb;
</ins><span class="cx"> 
</span><span class="cx">                 if ( isset( $_POST['submit'] ) ) {
</span><span class="cx">                         check_admin_referer( 'bpwizard_ms_update' );
</span><span class="lines">@@ -761,7 +761,7 @@
</span><span class="cx">                                 $disabled['bp-blogs.php'] = 1;
</span><span class="cx">                         } else {
</span><span class="cx">                                 // Make sure that the pages are created on the BP_ROOT_BLOG, no matter which Dashboard the setup is being run on
</span><del>-                                if ( $current_blog-&gt;blog_id != BP_ROOT_BLOG &amp;&amp; !defined( 'BP_ENABLE_MULTIBLOG' ) )
</del><ins>+                                if ( $wpdb-&gt;blogid != BP_ROOT_BLOG &amp;&amp; !defined( 'BP_ENABLE_MULTIBLOG' ) )
</ins><span class="cx">                                         switch_to_blog( BP_ROOT_BLOG );
</span><span class="cx"> 
</span><span class="cx">                                 $existing_pages = get_option( 'bp-pages' );
</span><span class="lines">@@ -770,7 +770,7 @@
</span><span class="cx"> 
</span><span class="cx">                                 update_option( 'bp-pages', $bp_pages );
</span><span class="cx"> 
</span><del>-                                if ( $current_blog-&gt;blog_id != BP_ROOT_BLOG )
</del><ins>+                                if ( $wpdb-&gt;blogid != BP_ROOT_BLOG )
</ins><span class="cx">                                         restore_current_blog();
</span><span class="cx"> 
</span><span class="cx">                                 unset( $disabled['bp-blogs.php'] );
</span><span class="lines">@@ -809,13 +809,13 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         function step_pages_save() {
</span><del>-                global $current_blog;
</del><ins>+                global $wpdb;
</ins><span class="cx"> 
</span><span class="cx">                 if ( isset( $_POST['submit'] ) &amp;&amp; isset( $_POST['bp_pages'] ) ) {
</span><span class="cx">                         check_admin_referer( 'bpwizard_pages' );
</span><span class="cx"> 
</span><span class="cx">                         // Make sure that the pages are created on the BP_ROOT_BLOG, no matter which Dashboard the setup is being run on
</span><del>-                        if ( !empty( $current_blog-&gt;blog_id ) &amp;&amp; $current_blog-&gt;blog_id != BP_ROOT_BLOG &amp;&amp; !defined( 'BP_ENABLE_MULTIBLOG' ) )
</del><ins>+                        if ( !empty( $wpdb-&gt;blogid ) &amp;&amp; $wpdb-&gt;blogid != BP_ROOT_BLOG &amp;&amp; !defined( 'BP_ENABLE_MULTIBLOG' ) )
</ins><span class="cx">                                 switch_to_blog( BP_ROOT_BLOG );
</span><span class="cx"> 
</span><span class="cx">                         // Delete any existing pages
</span><span class="lines">@@ -828,7 +828,7 @@
</span><span class="cx"> 
</span><span class="cx">                         update_option( 'bp-pages', $bp_pages );
</span><span class="cx"> 
</span><del>-                        if ( !empty( $current_blog-&gt;blog_id ) &amp;&amp; $current_blog-&gt;blog_id != BP_ROOT_BLOG )
</del><ins>+                        if ( !empty( $wpdb-&gt;blogid ) &amp;&amp; $wpdb-&gt;blogid != BP_ROOT_BLOG )
</ins><span class="cx">                                 restore_current_blog();
</span><span class="cx"> 
</span><span class="cx">                         return true;
</span><span class="lines">@@ -852,7 +852,7 @@
</span><span class="cx">                                 if ( !empty($permalink_structure) )
</span><span class="cx">                                         $permalink_structure = preg_replace( '#/+#', '/', '/' . $_POST['permalink_structure'] );
</span><span class="cx"> 
</span><del>-                                if ( ( defined( 'VHOST' ) &amp;&amp; constant( 'VHOST' ) == 'no' ) &amp;&amp; $permalink_structure != '' &amp;&amp; $current_site-&gt;domain.$current_site-&gt;path == $current_blog-&gt;domain.$current_blog-&gt;path )
</del><ins>+                                if ( ( defined( 'VHOST' ) &amp;&amp; constant( 'VHOST' ) == 'no' ) &amp;&amp; $permalink_structure != '' &amp;&amp; $current_site-&gt;domain . $current_site-&gt;path == $current_blog-&gt;domain . $current_blog-&gt;path )
</ins><span class="cx">                                         $permalink_structure = '/blog' . $permalink_structure;
</span><span class="cx"> 
</span><span class="cx">                                 $wp_rewrite-&gt;set_permalink_structure( $permalink_structure );
</span></span></pre></div>
<a id="trunkbpcorebpcoreavatarsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-avatars.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-avatars.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-core/bp-core-avatars.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -563,12 +563,12 @@
</span><span class="cx">  *
</span><span class="cx">  * Returns the absolute upload path for the WP installation
</span><span class="cx">  *
</span><del>- * @global object $current_blog Current blog information
</del><ins>+ * @global object $wpdb WordPress database global
</ins><span class="cx">  * @uses wp_upload_dir To get upload directory info
</span><span class="cx">  * @return string Absolute path to WP upload directory
</span><span class="cx">  */
</span><span class="cx"> function bp_core_avatar_upload_path() {
</span><del>-        global $current_blog;
</del><ins>+        global $wpdb;
</ins><span class="cx"> 
</span><span class="cx">         // Get upload directory information from current site
</span><span class="cx">         $upload_dir = wp_upload_dir();
</span><span class="lines">@@ -578,7 +578,7 @@
</span><span class="cx">                 $basedir = $upload_dir['baseurl'];
</span><span class="cx"> 
</span><span class="cx">                 // If multisite, and current blog does not match root blog, make adjustments
</span><del>-                if ( is_multisite() &amp;&amp; BP_ROOT_BLOG != $current_blog-&gt;blog_id )
</del><ins>+                if ( is_multisite() &amp;&amp; BP_ROOT_BLOG != $wpdb-&gt;blogid )
</ins><span class="cx">                         $basedir = get_blog_option( BP_ROOT_BLOG, 'upload_path' );
</span><span class="cx">         } else {
</span><span class="cx">                 $basedir = '';
</span><span class="lines">@@ -592,12 +592,12 @@
</span><span class="cx">  *
</span><span class="cx">  * Returns the raw base URL for root site upload location
</span><span class="cx">  *
</span><del>- * @global object $current_blog Current blog information
</del><ins>+ * @global object $wpdb WordPress database global
</ins><span class="cx">  * @uses wp_upload_dir To get upload directory info
</span><span class="cx">  * @return string Full URL to current upload location
</span><span class="cx">  */
</span><span class="cx"> function bp_core_avatar_url() {
</span><del>-        global $current_blog;
</del><ins>+        global $wpdb;
</ins><span class="cx"> 
</span><span class="cx">         // Get upload directory information from current site
</span><span class="cx">         $upload_dir = wp_upload_dir();
</span><span class="lines">@@ -607,7 +607,7 @@
</span><span class="cx">                 $baseurl = $upload_dir['baseurl'];
</span><span class="cx"> 
</span><span class="cx">                 // If multisite, and current blog does not match root blog, make adjustments
</span><del>-                if ( is_multisite() &amp;&amp; BP_ROOT_BLOG != $current_blog-&gt;blog_id )
</del><ins>+                if ( is_multisite() &amp;&amp; BP_ROOT_BLOG != $wpdb-&gt;blogid )
</ins><span class="cx">                         $baseurl = trailingslashit( get_blog_option( BP_ROOT_BLOG, 'home' ) ) . get_blog_option( BP_ROOT_BLOG, 'upload_path' );
</span><span class="cx">         } else {
</span><span class="cx">                 $baseurl = '';
</span></span></pre></div>
<a id="trunkbpcorebpcorecatchuriphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-catchuri.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-catchuri.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-core/bp-core-catchuri.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">  */
</span><span class="cx"> function bp_core_set_uri_globals() {
</span><span class="cx">         global $bp, $bp_unfiltered_uri, $bp_unfiltered_uri_offset;
</span><del>-        global $current_blog;
</del><ins>+        global $current_blog, $wpdb;
</ins><span class="cx"> 
</span><span class="cx">         // Create global component, action, and item variables
</span><span class="cx">         $bp-&gt;current_component = $bp-&gt;current_action = $bp-&gt;current_item ='';
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">         // Only catch URI's on the root blog if we are not running
</span><span class="cx">         // on multiple blogs
</span><span class="cx">         if ( !defined( 'BP_ENABLE_MULTIBLOG' ) &amp;&amp; is_multisite() ) {
</span><del>-                if ( BP_ROOT_BLOG != (int) $current_blog-&gt;blog_id )
</del><ins>+                if ( BP_ROOT_BLOG != (int) $wpdb-&gt;blogid )
</ins><span class="cx">                         return false;
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcorebpcorecssjsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-cssjs.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-cssjs.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-core/bp-core-cssjs.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -32,9 +32,9 @@
</span><span class="cx"> add_action( 'admin_head', 'bp_core_admin_menu_icon_css' );
</span><span class="cx"> 
</span><span class="cx"> function bp_core_confirmation_js() {
</span><del>-        global $current_blog;
</del><ins>+        global $wpdb;
</ins><span class="cx"> 
</span><del>-        if ( is_multisite() &amp;&amp; $current_blog-&gt;blog_id != BP_ROOT_BLOG )
</del><ins>+        if ( is_multisite() &amp;&amp; $wpdb-&gt;blogid != BP_ROOT_BLOG )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         if ( !wp_script_is( 'jquery' ) )
</span></span></pre></div>
<a id="trunkbpcorebpcorefiltersphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-filters.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-filters.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-core/bp-core-filters.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -67,15 +67,15 @@
</span><span class="cx">  * @package BuddyPress Core
</span><span class="cx">  */
</span><span class="cx"> function bp_core_allow_default_theme( $themes ) {
</span><del>-        global $bp, $current_blog;
</del><ins>+        global $bp, $wpdb;
</ins><span class="cx"> 
</span><span class="cx">         if ( !is_super_admin() )
</span><span class="cx">                 return $themes;
</span><span class="cx"> 
</span><del>-        if ( $current_blog-&gt;blog_id == BP_ROOT_BLOG ) {
</del><ins>+        if ( $wpdb-&gt;blogid == BP_ROOT_BLOG ) {
</ins><span class="cx">                 $themes['bp-default'] = 1;
</span><span class="cx">         }
</span><del>-
</del><ins>+        
</ins><span class="cx">         return $themes;
</span><span class="cx"> }
</span><span class="cx"> add_filter( 'allowed_themes', 'bp_core_allow_default_theme' );
</span><span class="lines">@@ -125,9 +125,9 @@
</span><span class="cx">  * @package BuddyPress Core
</span><span class="cx">  */
</span><span class="cx"> function bp_core_login_redirect( $redirect_to ) {
</span><del>-        global $bp, $current_blog;
</del><ins>+        global $bp, $wpdb;
</ins><span class="cx"> 
</span><del>-        if ( is_multisite() &amp;&amp; $current_blog-&gt;blog_id != BP_ROOT_BLOG )
</del><ins>+        if ( is_multisite() &amp;&amp; $wpdb-&gt;blogid != BP_ROOT_BLOG )
</ins><span class="cx">                 return $redirect_to;
</span><span class="cx"> 
</span><span class="cx">         if ( isset( $_REQUEST['redirect_to'] ) &amp;&amp; ( !empty( $_REQUEST['redirect_to'] ) || strpos( $_REQUEST['redirect_to'], 'wp-admin' ) ) )
</span></span></pre></div>
<a id="trunkbpcorebpcorefunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-functions.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-functions.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-core/bp-core-functions.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -168,10 +168,10 @@
</span><span class="cx">  * @return $domain The domain URL for the blog.
</span><span class="cx">  */
</span><span class="cx"> function bp_core_get_root_domain() {
</span><del>-        global $current_blog;
</del><ins>+        global $wpdb;
</ins><span class="cx"> 
</span><span class="cx">         if ( defined( 'BP_ENABLE_MULTIBLOG' ) )
</span><del>-                $domain = get_home_url( $current_blog-&gt;blog_id );
</del><ins>+                $domain = get_home_url( $wpdb-&gt;blogid );
</ins><span class="cx">         else
</span><span class="cx">                 $domain = get_home_url( BP_ROOT_BLOG );
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-template.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-template.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-core/bp-core-template.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function bp_get_page_title() {
</span><del>-        global $bp, $post, $wp_query, $current_blog;
</del><ins>+        global $bp, $post, $wp_query;
</ins><span class="cx"> 
</span><span class="cx">         // Home
</span><span class="cx">         if ( is_front_page() || ( is_home() &amp;&amp; bp_is_page( 'home' ) ) ) {
</span></span></pre></div>
<a id="trunkbpmembersbpmembersbuddybarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-buddybar.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-buddybar.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-members/bp-members-buddybar.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -41,17 +41,17 @@
</span><span class="cx"> 
</span><span class="cx"> // **** &quot;Blog Authors&quot; Menu (visible when not logged in) ********
</span><span class="cx"> function bp_adminbar_authors_menu() {
</span><del>-        global $bp, $current_blog, $wpdb;
</del><ins>+        global $bp, $wpdb;
</ins><span class="cx"> 
</span><span class="cx">         // Only for multisite
</span><span class="cx">         if ( !is_multisite() )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         // Hide on root blog
</span><del>-        if ( $current_blog-&gt;blog_id == BP_ROOT_BLOG || !bp_is_active( 'blogs' ) )
</del><ins>+        if ( $wpdb-&gt;blogid == BP_ROOT_BLOG || !bp_is_active( 'blogs' ) )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        $blog_prefix = $wpdb-&gt;get_blog_prefix( $current_blog-&gt;blog_id );
</del><ins>+        $blog_prefix = $wpdb-&gt;get_blog_prefix( $wpdb-&gt;blogid );
</ins><span class="cx">         $authors     = $wpdb-&gt;get_results( &quot;SELECT user_id, user_login, user_nicename, display_name, user_email, meta_value as caps FROM $wpdb-&gt;users u, $wpdb-&gt;usermeta um WHERE u.ID = um.user_id AND meta_key = '{$blog_prefix}capabilities' ORDER BY um.user_id&quot; );
</span><span class="cx"> 
</span><span class="cx">         if ( !empty( $authors ) ) {
</span></span></pre></div>
<a id="trunkbpmembersbpmemberstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-template.php (4106 => 4107)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-template.php        2011-03-11 17:44:23 UTC (rev 4106)
+++ trunk/bp-members/bp-members-template.php        2011-03-11 18:02:47 UTC (rev 4107)
</span><span class="lines">@@ -603,9 +603,6 @@
</span><span class="cx"> /** Navigation and other misc template tags **/
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * bp_get_nav()
- * TEMPLATE TAG
- *
</del><span class="cx">  * Uses the $bp-&gt;bp_nav global to render out the navigation within a BuddyPress install.
</span><span class="cx">  * Each component adds to this navigation array within its own [component_name]_setup_nav() function.
</span><span class="cx">  *
</span><span class="lines">@@ -621,7 +618,7 @@
</span><span class="cx">  * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
</span><span class="cx">  */
</span><span class="cx"> function bp_get_loggedin_user_nav() {
</span><del>-        global $bp, $current_blog;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         // Loop through each navigation item
</span><span class="cx">         foreach( (array) $bp-&gt;bp_nav as $nav_item ) {
</span></span></pre>
</div>
</div>

</body>
</html>