<!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" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { 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 #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#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>
<title>[BuddyPress] [3186] branches/1.2: Fixes #2561 props wpmuguru</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>3186</dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2010-08-12 06:33:05 +0000 (Thu, 12 Aug 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixes #2561 props wpmuguru</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branches12bpactivityphp">branches/1.2/bp-activity.php</a></li>
<li><a href="#branches12bpblogsphp">branches/1.2/bp-blogs.php</a></li>
<li><a href="#branches12bpcorephp">branches/1.2/bp-core.php</a></li>
<li><a href="#branches12bpforumsbpforumsadminphp">branches/1.2/bp-forums/bp-forums-admin.php</a></li>
<li><a href="#branches12bpfriendsphp">branches/1.2/bp-friends.php</a></li>
<li><a href="#branches12bpgroupsphp">branches/1.2/bp-groups.php</a></li>
<li><a href="#branches12bpmessagesphp">branches/1.2/bp-messages.php</a></li>
<li><a href="#branches12bpxprofilephp">branches/1.2/bp-xprofile.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branches12bpactivityphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-activity.php (3185 => 3186)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-activity.php        2010-08-12 05:45:09 UTC (rev 3185)
+++ branches/1.2/bp-activity.php        2010-08-12 06:33:05 UTC (rev 3186)
</span><span class="lines">@@ -73,14 +73,16 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function bp_activity_setup_globals() {
</span><del>-        global $bp, $wpdb, $current_blog;
</del><ins>+        global $bp, $current_blog;
</ins><span class="cx"> 
</span><span class="cx">         /* Internal identifier */
</span><span class="cx">         $bp-&gt;activity-&gt;id = 'activity';
</span><span class="cx"> 
</span><del>-        $bp-&gt;activity-&gt;table_name = $wpdb-&gt;base_prefix . 'bp_activity';
-        $bp-&gt;activity-&gt;table_name_meta = $wpdb-&gt;base_prefix . 'bp_activity_meta';
</del><span class="cx">         $bp-&gt;activity-&gt;slug = BP_ACTIVITY_SLUG;
</span><ins>+
+        $bp-&gt;activity-&gt;table_name      = $bp-&gt;table_prefix . 'bp_activity';
+        $bp-&gt;activity-&gt;table_name_meta = $bp-&gt;table_prefix . 'bp_activity_meta';
+
</ins><span class="cx">         $bp-&gt;activity-&gt;format_notification_function = 'bp_activity_format_notifications';
</span><span class="cx"> 
</span><span class="cx">         /* Register this in the active components array */
</span><span class="lines">@@ -91,7 +93,7 @@
</span><span class="cx"> add_action( 'bp_setup_globals', 'bp_activity_setup_globals' );
</span><span class="cx"> 
</span><span class="cx"> function bp_activity_check_installed() {
</span><del>-        global $wpdb, $bp;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         if ( get_site_option( 'bp-activity-db-version' ) &lt; BP_ACTIVITY_DB_VERSION )
</span><span class="cx">                 bp_activity_install();
</span><span class="lines">@@ -623,7 +625,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function bp_activity_add( $args = '' ) {
</span><del>-        global $bp, $wpdb;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         $defaults = array(
</span><span class="cx">                 'id'                =&gt; false, // Pass an existing activity ID to update an existing entry.
</span></span></pre></div>
<a id="branches12bpblogsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-blogs.php (3185 => 3186)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-blogs.php        2010-08-12 05:45:09 UTC (rev 3185)
+++ branches/1.2/bp-blogs.php        2010-08-12 06:33:05 UTC (rev 3186)
</span><span class="lines">@@ -68,11 +68,13 @@
</span><span class="cx">         /* For internal identification */
</span><span class="cx">         $bp-&gt;blogs-&gt;id = 'blogs';
</span><span class="cx"> 
</span><del>-        $bp-&gt;blogs-&gt;table_name = $wpdb-&gt;base_prefix . 'bp_user_blogs';
-        $bp-&gt;blogs-&gt;table_name_blogmeta = $wpdb-&gt;base_prefix . 'bp_user_blogs_blogmeta';
-        $bp-&gt;blogs-&gt;format_notification_function = 'bp_blogs_format_notifications';
</del><span class="cx">         $bp-&gt;blogs-&gt;slug = BP_BLOGS_SLUG;
</span><span class="cx"> 
</span><ins>+        $bp-&gt;blogs-&gt;table_name          = $bp-&gt;table_prefix . 'bp_user_blogs';
+        $bp-&gt;blogs-&gt;table_name_blogmeta = $bp-&gt;table_prefix . 'bp_user_blogs_blogmeta';
+
+        $bp-&gt;blogs-&gt;format_notification_function = 'bp_blogs_format_notifications';
+
</ins><span class="cx">         /* Register this in the active components array */
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;blogs-&gt;slug] = $bp-&gt;blogs-&gt;id;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branches12bpcorephp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-core.php (3185 => 3186)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-core.php        2010-08-12 05:45:09 UTC (rev 3185)
+++ branches/1.2/bp-core.php        2010-08-12 06:33:05 UTC (rev 3186)
</span><span class="lines">@@ -84,13 +84,16 @@
</span><span class="cx">  * @uses bp_core_get_user_domain() Returns the domain for a user
</span><span class="cx">  */
</span><span class="cx"> function bp_core_setup_globals() {
</span><del>-        global $bp, $wpdb;
</del><ins>+        global $bp;
</ins><span class="cx">         global $current_user, $current_component, $current_action, $current_blog;
</span><span class="cx">         global $displayed_user_id;
</span><span class="cx">         global $action_variables;
</span><span class="cx"> 
</span><span class="cx">         $current_user = wp_get_current_user();
</span><span class="cx"> 
</span><ins>+        /* Get the base database prefix */
+        $bp-&gt;table_prefix = bp_core_get_table_prefix();
+
</ins><span class="cx">         /* The domain for the root of the site where the main blog resides */
</span><span class="cx">         $bp-&gt;root_domain = bp_core_get_root_domain();
</span><span class="cx"> 
</span><span class="lines">@@ -153,12 +156,12 @@
</span><span class="cx">         $bp-&gt;active_components = array();
</span><span class="cx"> 
</span><span class="cx">         /* Fetches the default Gravatar image to use if the user/group/blog has no avatar or gravatar */
</span><del>-        $bp-&gt;grav_default-&gt;user = apply_filters( 'bp_user_gravatar_default', $bp-&gt;site_options['user-avatar-default'] );
</del><ins>+        $bp-&gt;grav_default-&gt;user  = apply_filters( 'bp_user_gravatar_default', $bp-&gt;site_options['user-avatar-default'] );
</ins><span class="cx">         $bp-&gt;grav_default-&gt;group = apply_filters( 'bp_group_gravatar_default', 'identicon' );
</span><del>-        $bp-&gt;grav_default-&gt;blog = apply_filters( 'bp_blog_gravatar_default', 'identicon' );
</del><ins>+        $bp-&gt;grav_default-&gt;blog  = apply_filters( 'bp_blog_gravatar_default', 'identicon' );
</ins><span class="cx"> 
</span><span class="cx">         /* Fetch the full name for the logged in and current user */
</span><del>-        $bp-&gt;loggedin_user-&gt;fullname = bp_core_get_user_displayname( $bp-&gt;loggedin_user-&gt;id );
</del><ins>+        $bp-&gt;loggedin_user-&gt;fullname  = bp_core_get_user_displayname( $bp-&gt;loggedin_user-&gt;id );
</ins><span class="cx">         $bp-&gt;displayed_user-&gt;fullname = bp_core_get_user_displayname( $bp-&gt;displayed_user-&gt;id );
</span><span class="cx"> 
</span><span class="cx">         /* Used to determine if user has admin rights on current content. If the logged in user is viewing
</span><span class="lines">@@ -170,7 +173,7 @@
</span><span class="cx">         /* Used to determine if the logged in user is a moderator for the current content. */
</span><span class="cx">         $bp-&gt;is_item_mod = false;
</span><span class="cx"> 
</span><del>-        $bp-&gt;core-&gt;table_name_notifications = $wpdb-&gt;base_prefix . 'bp_notifications';
</del><ins>+        $bp-&gt;core-&gt;table_name_notifications = $bp-&gt;table_prefix . 'bp_notifications';
</ins><span class="cx"> 
</span><span class="cx">         if ( !$bp-&gt;current_component &amp;&amp; $bp-&gt;displayed_user-&gt;id )
</span><span class="cx">                 $bp-&gt;current_component = $bp-&gt;default_component;
</span><span class="lines">@@ -198,7 +201,20 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'bp_setup_root_components', 'bp_core_setup_root_uris' );
</span><span class="cx"> 
</span><ins>+/**
+ * bp_core_get_table_prefix()
+ *
+ * Allow filtering of database prefix. Intended for use in multinetwork installations.
+ *
+ * @global object $wpdb WordPress database object
+ * @return string Filtered database prefix
+ */
+function bp_core_get_table_prefix() {
+        global $wpdb;
</ins><span class="cx"> 
</span><ins>+        return apply_filters( 'bp_core_get_table_prefix', $wpdb-&gt;base_prefix );
+}
+
</ins><span class="cx"> /**
</span><span class="cx">  * bp_core_install()
</span><span class="cx">  *
</span><span class="lines">@@ -251,14 +267,13 @@
</span><span class="cx">  *
</span><span class="cx">  * @package BuddyPress Core
</span><span class="cx">  * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
</span><del>- * @global $wpdb WordPress DB access object.
</del><span class="cx">  * @global $current_user WordPress global variable containing current logged in user information
</span><span class="cx">  * @uses is_site_admin() returns true if the current user is a site admin, false if not
</span><span class="cx">  * @uses get_site_option() fetches the value for a meta_key in the wp_sitemeta table
</span><span class="cx">  * @uses bp_core_install() runs the installation of DB tables for the core component
</span><span class="cx">  */
</span><span class="cx"> function bp_core_check_installed() {
</span><del>-        global $wpdb, $bp;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         if ( !is_site_admin() )
</span><span class="cx">                 return false;
</span><span class="lines">@@ -278,7 +293,6 @@
</span><span class="cx">  *
</span><span class="cx">  * @package BuddyPress Core
</span><span class="cx">  * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
</span><del>- * @global $wpdb WordPress DB access object.
</del><span class="cx">  * @uses is_site_admin() returns true if the current user is a site admin, false if not
</span><span class="cx">  * @uses add_submenu_page() WP function to add a submenu item
</span><span class="cx">  */
</span><span class="lines">@@ -933,7 +947,6 @@
</span><span class="cx">  *
</span><span class="cx">  * @package BuddyPress Core
</span><span class="cx">  * @param $username str Username to check.
</span><del>- * @global $wpdb WordPress DB access object.
</del><span class="cx">  * @return false on no match
</span><span class="cx">  * @return int the user ID of the matched user.
</span><span class="cx">  */
</span><span class="lines">@@ -975,12 +988,11 @@
</span><span class="cx">  *
</span><span class="cx">  * @package BuddyPress Core
</span><span class="cx">  * @param $username str Username to check.
</span><del>- * @global $wpdb WordPress DB access object.
</del><span class="cx">  * @return false on no match
</span><span class="cx">  * @return int the user ID of the matched user.
</span><span class="cx">  */
</span><span class="cx"> function bp_core_get_random_member() {
</span><del>-        global $bp, $wpdb;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         if ( isset( $_GET['random-member'] ) ) {
</span><span class="cx">                 $user = bp_core_get_users( array( 'type' =&gt; 'random', 'per_page' =&gt; 1 ) );
</span><span class="lines">@@ -1708,7 +1720,7 @@
</span><span class="cx">  * @uses get_site_option Checks if account deletion is allowed
</span><span class="cx">  */
</span><span class="cx"> function bp_core_delete_account( $user_id = false ) {
</span><del>-        global $bp, $wpdb, $wp_version;
</del><ins>+        global $bp, $wp_version;
</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 class="lines">@@ -1842,8 +1854,7 @@
</span><span class="cx">  * @package BuddyPress Core
</span><span class="cx">  */
</span><span class="cx"> function bp_core_print_generation_time() {
</span><del>-        global $wpdb;
-        ?&gt;
</del><ins>+?&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;!-- Generated in &lt;?php timer_stop(1); ?&gt; seconds. --&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branches12bpforumsbpforumsadminphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-forums/bp-forums-admin.php (3185 => 3186)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-forums/bp-forums-admin.php        2010-08-12 05:45:09 UTC (rev 3185)
+++ branches/1.2/bp-forums/bp-forums-admin.php        2010-08-12 06:33:05 UTC (rev 3186)
</span><span class="lines">@@ -121,7 +121,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function bp_forums_bbpress_install() {
</span><del>-        global $wpdb, $bbdb;
</del><ins>+        global $wpdb, $bbdb, $bp;
</ins><span class="cx"> 
</span><span class="cx">         check_admin_referer( 'bp_forums_new_install_init' );
</span><span class="cx"> 
</span><span class="lines">@@ -140,7 +140,7 @@
</span><span class="cx">                         &quot;define( 'BB_SECURE_A&quot;                  =&gt; array( &quot;'put your unique phrase here'&quot;,  &quot;'&quot; . addslashes( SECURE_AUTH_KEY ) . &quot;'&quot; ),
</span><span class="cx">                         &quot;define( 'BB_LOGGED_I&quot;                  =&gt; array( &quot;'put your unique phrase here'&quot;,  &quot;'&quot; . addslashes( LOGGED_IN_KEY ) . &quot;'&quot; ),
</span><span class="cx">                         &quot;define( 'BB_NONCE_KE&quot;                  =&gt; array( &quot;'put your unique phrase here'&quot;,  &quot;'&quot; . addslashes( NONCE_KEY ) . &quot;'&quot; ),
</span><del>-                        &quot;\$bb_table_prefix = '&quot;                 =&gt; array( &quot;'bb_'&quot;,                          &quot;'&quot; . $wpdb-&gt;base_prefix . &quot;bb_'&quot; ),
</del><ins>+                        &quot;\$bb_table_prefix = '&quot;                 =&gt; array( &quot;'bb_'&quot;,                          &quot;'&quot; . $bp-&gt;table_prefix . &quot;bb_'&quot; ),
</ins><span class="cx">                         &quot;define( 'BB_LANG', '&quot;                         =&gt; array( &quot;''&quot;,                                  &quot;'&quot; . WPLANG . &quot;'&quot; )
</span><span class="cx">                 )
</span><span class="cx">         );
</span></span></pre></div>
<a id="branches12bpfriendsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-friends.php (3185 => 3186)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-friends.php        2010-08-12 05:45:09 UTC (rev 3185)
+++ branches/1.2/bp-friends.php        2010-08-12 06:33:05 UTC (rev 3186)
</span><span class="lines">@@ -33,15 +33,17 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function friends_setup_globals() {
</span><del>-        global $bp, $wpdb;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         /* For internal identification */
</span><span class="cx">         $bp-&gt;friends-&gt;id = 'friends';
</span><span class="cx"> 
</span><del>-        $bp-&gt;friends-&gt;table_name = $wpdb-&gt;base_prefix . 'bp_friends';
-        $bp-&gt;friends-&gt;format_notification_function = 'friends_format_notifications';
</del><span class="cx">         $bp-&gt;friends-&gt;slug = BP_FRIENDS_SLUG;
</span><span class="cx"> 
</span><ins>+        $bp-&gt;friends-&gt;table_name = $bp-&gt;table_prefix . 'bp_friends';
+
+        $bp-&gt;friends-&gt;format_notification_function = 'friends_format_notifications';
+
</ins><span class="cx">         /* Register this in the active components array */
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;friends-&gt;slug] = $bp-&gt;friends-&gt;id;
</span><span class="cx"> 
</span><span class="lines">@@ -50,7 +52,7 @@
</span><span class="cx"> add_action( 'bp_setup_globals', 'friends_setup_globals' );
</span><span class="cx"> 
</span><span class="cx"> function friends_check_installed() {
</span><del>-        global $wpdb, $bp;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         if ( !is_site_admin() )
</span><span class="cx">                 return false;
</span></span></pre></div>
<a id="branches12bpgroupsphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-groups.php (3185 => 3186)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-groups.php        2010-08-12 05:45:09 UTC (rev 3185)
+++ branches/1.2/bp-groups.php        2010-08-12 06:33:05 UTC (rev 3186)
</span><span class="lines">@@ -74,12 +74,14 @@
</span><span class="cx">         /* For internal identification */
</span><span class="cx">         $bp-&gt;groups-&gt;id = 'groups';
</span><span class="cx"> 
</span><del>-        $bp-&gt;groups-&gt;table_name = $wpdb-&gt;base_prefix . 'bp_groups';
-        $bp-&gt;groups-&gt;table_name_members = $wpdb-&gt;base_prefix . 'bp_groups_members';
-        $bp-&gt;groups-&gt;table_name_groupmeta = $wpdb-&gt;base_prefix . 'bp_groups_groupmeta';
-        $bp-&gt;groups-&gt;format_notification_function = 'groups_format_notifications';
</del><span class="cx">         $bp-&gt;groups-&gt;slug = BP_GROUPS_SLUG;
</span><span class="cx"> 
</span><ins>+        $bp-&gt;groups-&gt;table_name           = $bp-&gt;table_prefix . 'bp_groups';
+        $bp-&gt;groups-&gt;table_name_members   = $bp-&gt;table_prefix . 'bp_groups_members';
+        $bp-&gt;groups-&gt;table_name_groupmeta = $bp-&gt;table_prefix . 'bp_groups_groupmeta';
+
+        $bp-&gt;groups-&gt;format_notification_function = 'groups_format_notifications';
+
</ins><span class="cx">         /* Register this in the active components array */
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;groups-&gt;slug] = $bp-&gt;groups-&gt;id;
</span><span class="cx"> 
</span></span></pre></div>
<a id="branches12bpmessagesphp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-messages.php (3185 => 3186)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-messages.php        2010-08-12 05:45:09 UTC (rev 3185)
+++ branches/1.2/bp-messages.php        2010-08-12 06:33:05 UTC (rev 3186)
</span><span class="lines">@@ -66,17 +66,19 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function messages_setup_globals() {
</span><del>-        global $bp, $wpdb;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         /* For internal identification */
</span><span class="cx">         $bp-&gt;messages-&gt;id = 'messages';
</span><span class="cx"> 
</span><del>-        $bp-&gt;messages-&gt;table_name_messages = $wpdb-&gt;base_prefix . 'bp_messages_messages';
-        $bp-&gt;messages-&gt;table_name_recipients = $wpdb-&gt;base_prefix . 'bp_messages_recipients';
-        $bp-&gt;messages-&gt;table_name_notices = $wpdb-&gt;base_prefix . 'bp_messages_notices';
-        $bp-&gt;messages-&gt;format_notification_function = 'messages_format_notifications';
</del><span class="cx">         $bp-&gt;messages-&gt;slug = BP_MESSAGES_SLUG;
</span><span class="cx"> 
</span><ins>+        $bp-&gt;messages-&gt;table_name_notices    = $bp-&gt;table_prefix . 'bp_messages_notices';
+        $bp-&gt;messages-&gt;table_name_messages   = $bp-&gt;table_prefix . 'bp_messages_messages';
+        $bp-&gt;messages-&gt;table_name_recipients = $bp-&gt;table_prefix . 'bp_messages_recipients';
+
+        $bp-&gt;messages-&gt;format_notification_function = 'messages_format_notifications';
+
</ins><span class="cx">         /* Register this in the active components array */
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;messages-&gt;slug] = $bp-&gt;messages-&gt;id;
</span><span class="cx"> 
</span><span class="lines">@@ -85,7 +87,7 @@
</span><span class="cx"> add_action( 'bp_setup_globals', 'messages_setup_globals' );
</span><span class="cx"> 
</span><span class="cx"> function messages_check_installed() {
</span><del>-        global $wpdb, $bp;
</del><ins>+        global $bp;
</ins><span class="cx"> 
</span><span class="cx">         if ( !is_site_admin() )
</span><span class="cx">                 return false;
</span></span></pre></div>
<a id="branches12bpxprofilephp"></a>
<div class="modfile"><h4>Modified: branches/1.2/bp-xprofile.php (3185 => 3186)</h4>
<pre class="diff"><span>
<span class="info">--- branches/1.2/bp-xprofile.php        2010-08-12 05:45:09 UTC (rev 3185)
+++ branches/1.2/bp-xprofile.php        2010-08-12 06:33:05 UTC (rev 3186)
</span><span class="lines">@@ -104,12 +104,13 @@
</span><span class="cx">         /* For internal identification */
</span><span class="cx">         $bp-&gt;profile-&gt;id = 'profile';
</span><span class="cx"> 
</span><del>-        $bp-&gt;profile-&gt;table_name_groups = $wpdb-&gt;base_prefix . 'bp_xprofile_groups';
-        $bp-&gt;profile-&gt;table_name_fields = $wpdb-&gt;base_prefix . 'bp_xprofile_fields';
-        $bp-&gt;profile-&gt;table_name_data = $wpdb-&gt;base_prefix . 'bp_xprofile_data';
</del><ins>+        $bp-&gt;profile-&gt;slug = BP_XPROFILE_SLUG;
</ins><span class="cx"> 
</span><ins>+        $bp-&gt;profile-&gt;table_name_data   = $bp-&gt;table_prefix . 'bp_xprofile_data';
+        $bp-&gt;profile-&gt;table_name_groups = $bp-&gt;table_prefix . 'bp_xprofile_groups';
+        $bp-&gt;profile-&gt;table_name_fields = $bp-&gt;table_prefix . 'bp_xprofile_fields';
+
</ins><span class="cx">         $bp-&gt;profile-&gt;format_notification_function = 'xprofile_format_notifications';
</span><del>-        $bp-&gt;profile-&gt;slug = BP_XPROFILE_SLUG;
</del><span class="cx"> 
</span><span class="cx">         /* Register this in the active components array */
</span><span class="cx">         $bp-&gt;active_components[$bp-&gt;profile-&gt;slug] = $bp-&gt;profile-&gt;id;
</span></span></pre>
</div>
</div>

</body>
</html>