<!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] [3365] trunk: Fixes quite a lot more WP_DEBUG warnings.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>3365</dd>
<dt>Author</dt> <dd>djpaul</dd>
<dt>Date</dt> <dd>2010-11-06 19:04:00 +0000 (Sat, 06 Nov 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixes quite a lot more WP_DEBUG warnings.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityclassesphp">trunk/bp-activity/bp-activity-classes.php</a></li>
<li><a href="#trunkbpactivitybpactivitytemplatetagsphp">trunk/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#trunkbpactivityphp">trunk/bp-activity.php</a></li>
<li><a href="#trunkbpcorebpcoreadminbarphp">trunk/bp-core/bp-core-adminbar.php</a></li>
<li><a href="#trunkbpcorebpcoresignupphp">trunk/bp-core/bp-core-signup.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatetagsphp">trunk/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#trunkbpcorephp">trunk/bp-core.php</a></li>
<li><a href="#trunkbpforumsphp">trunk/bp-forums.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsclassesphp">trunk/bp-groups/bp-groups-classes.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatetagsphp">trunk/bp-groups/bp-groups-templatetags.php</a></li>
<li><a href="#trunkbpmessagesbpmessagestemplatetagsphp">trunk/bp-messages/bp-messages-templatetags.php</a></li>
<li><a href="#trunkbpthemesbpdefault_incajaxphp">trunk/bp-themes/bp-default/_inc/ajax.php</a></li>
<li><a href="#trunkbpthemesbpdefaultfunctionsphp">trunk/bp-themes/bp-default/functions.php</a></li>
<li><a href="#trunkbpxprofilebpxprofilecssjsphp">trunk/bp-xprofile/bp-xprofile-cssjs.php</a></li>
<li><a href="#trunkbpxprofilephp">trunk/bp-xprofile.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-classes.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-classes.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-activity/bp-activity-classes.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -178,6 +178,7 @@
</span><span class="cx">                 if ( empty( $activity_ids ) )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><ins>+                $pag_sql = '';
</ins><span class="cx">                 if ( $per_page && $page )
</span><span class="cx">                         $pag_sql = $wpdb->prepare( "LIMIT %d, %d", intval( ( $page - 1 ) * $per_page ), intval( $per_page ) );
</span><span class="cx">
</span><span class="lines">@@ -336,6 +337,8 @@
</span><span class="cx">         function append_comments( $activities ) {
</span><span class="cx">                 global $bp, $wpdb;
</span><span class="cx">
</span><ins>+                $activity_comments = array();
+
</ins><span class="cx">                 /* Now fetch the activity comments and parse them into the correct position in the activities array. */
</span><span class="cx">                 foreach( (array)$activities as $activity ) {
</span><span class="cx">                         if ( 'activity_comment' != $activity->type && $activity->mptt_left && $activity->mptt_right )
</span><span class="lines">@@ -344,7 +347,8 @@
</span><span class="cx">
</span><span class="cx">                 /* Merge the comments with the activity items */
</span><span class="cx">                 foreach( (array)$activities as $key => $activity )
</span><del>-                        $activities[$key]->children = $activity_comments[$activity->id];
</del><ins>+                        if ( isset( $activity_comments[$activity->id] ) )
+                                $activities[$key]->children = $activity_comments[$activity->id];
</ins><span class="cx">
</span><span class="cx">                 return $activities;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-templatetags.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-activity/bp-activity-templatetags.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -641,7 +641,7 @@
</span><span class="cx">         function bp_activity_get_comments( $args = '' ) {
</span><span class="cx">                 global $activities_template, $bp;
</span><span class="cx">
</span><del>-                if ( !$activities_template->activity->children )
</del><ins>+                if ( !isset( $activities_template->activity->children ) || !$activities_template->activity->children )
</ins><span class="cx">                         return false;
</span><span class="cx">
</span><span class="cx">                 $comments_html = bp_activity_recurse_comments( $activities_template->activity );
</span><span class="lines">@@ -689,7 +689,7 @@
</span><span class="cx">         function bp_activity_get_comment_count( $args = '' ) {
</span><span class="cx">                 global $activities_template, $bp;
</span><span class="cx">
</span><del>-                if ( !$activities_template->activity->children )
</del><ins>+                if ( !isset( $activities_template->activity->children ) || !$activities_template->activity->children )
</ins><span class="cx">                         return 0;
</span><span class="cx">
</span><span class="cx">                 $count = bp_activity_recurse_comment_count( $activities_template->activity );
</span><span class="lines">@@ -723,7 +723,7 @@
</span><span class="cx"> }
</span><span class="cx">         function bp_get_activity_comment_form_nojs_display() {
</span><span class="cx">                 global $activities_template;
</span><del>-                if ( $_GET['ac'] == $activities_template->activity->id . '/' )
</del><ins>+                if ( isset( $_GET['ac'] ) && $_GET['ac'] == $activities_template->activity->id . '/' )
</ins><span class="cx">                         return 'style="display: block"';
</span><span class="cx">
</span><span class="cx">                 return false;
</span><span class="lines">@@ -931,7 +931,7 @@
</span><span class="cx">                 if ( bp_is_my_profile() || !is_user_logged_in() )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->activity->slug . '/?r=' . bp_core_get_username( $bp->displayed_user->user_id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
</del><ins>+                return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->activity->slug . '/?r=' . bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-activity.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -246,8 +246,9 @@
</span><span class="cx">                         if ( $group = groups_get_group( array( 'group_id' => $activity->item_id ) ) )
</span><span class="cx">                                 $redirect = bp_get_group_permalink( $group ) . $bp->activity->slug . '/' . $activity->id . '/';
</span><span class="cx">                 }
</span><del>-        } else
</del><ins>+        } else {
</ins><span class="cx">                 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug . '/' . $activity->id;
</span><ins>+        }
</ins><span class="cx">
</span><span class="cx">         $redirect = apply_filters( 'bp_activity_permalink_redirect_url', $redirect, &$activity );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorebpcoreadminbarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-adminbar.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-adminbar.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-core/bp-core-adminbar.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx">         if ( defined( 'BP_DISABLE_ADMIN_BAR' ) )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><del>-        if ( (int)$bp->site_options['hide-loggedout-adminbar'] && !is_user_logged_in() )
</del><ins>+        if ( isset( $bp->site_options['hide-loggedout-adminbar'] ) && (int)$bp->site_options['hide-loggedout-adminbar'] && !is_user_logged_in() )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $bp->doing_admin_bar = true;
</span><span class="lines">@@ -75,8 +75,15 @@
</span><span class="cx">                         $sub_counter = 0;
</span><span class="cx">
</span><span class="cx">                         foreach( (array)$bp->bp_options_nav[$nav_item['slug']] as $subnav_item ) {
</span><del>-                                $link = str_replace( $bp->displayed_user->domain, $bp->loggedin_user->domain, $subnav_item['link'] );
-                                $name = str_replace( $bp->displayed_user->userdata->user_login, $bp->loggedin_user->userdata->user_login, $subnav_item['name'] );
</del><ins>+                                $link = $subnav_item['link'];
+                                $name = $subnav_item['name'];
+
+                                if ( isset( $bp->displayed_user->domain ) )
+                                        $link = str_replace( $bp->displayed_user->domain, $bp->loggedin_user->domain, $subnav_item['link'] );
+
+                                if ( isset( $bp->displayed_user->userdata->user_login ) )
+                                        $name = str_replace( $bp->displayed_user->userdata->user_login, $bp->loggedin_user->userdata->user_login, $subnav_item['name'] );
+
</ins><span class="cx">                                 $alt = ( 0 == $sub_counter % 2 ) ? ' class="alt"' : '';
</span><span class="cx">                                 echo '<li' . $alt . '><a id="bp-admin-' . $subnav_item['css_id'] . '" href="' . $link . '">' . $name . '</a></li>';
</span><span class="cx">                                 $sub_counter++;
</span></span></pre></div>
<a id="trunkbpcorebpcoresignupphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-signup.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-signup.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-core/bp-core-signup.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -613,7 +613,11 @@
</span><span class="cx">
</span><span class="cx"> /* Kill the wp-signup.php if custom registration signup templates are present */
</span><span class="cx"> function bp_core_wpsignup_redirect() {
</span><del>-        if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php') && $_GET['action'] != 'register' )
</del><ins>+        $action = '';
+        if ( isset( $_GET['action'] ) )
+                $action = $_GET['action'];
+
+        if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php' ) && $action != 'register' )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         if ( locate_template( array( 'registration/register.php' ), false ) || locate_template( array( 'register.php' ), false ) )
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-templatetags.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-templatetags.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-core/bp-core-templatetags.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -1307,8 +1307,10 @@
</span><span class="cx"> function bp_ajax_querystring( $object = false ) {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        $bp->ajax_querystring = apply_filters( 'bp_ajax_querystring', $query_string, $object );
-        return $bp->ajax_querystring;
</del><ins>+        if ( !isset( $bp->ajax_querystring ) )
+                $bp->ajax_querystring = '';
+
+        return apply_filters( 'bp_ajax_querystring', $bp->ajax_querystring, $object );
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -1649,7 +1651,7 @@
</span><span class="cx"> function bp_is_user_profile() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( BP_XPROFILE_SLUG == $bp->current_component || $bp->core->profile->slug == $bp->current_component )
</del><ins>+        if ( defined( 'BP_XPROFILE_SLUG' ) && BP_XPROFILE_SLUG == $bp->current_component || isset( $bp->core->profile->slug ) && $bp->core->profile->slug == $bp->current_component )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="lines">@@ -1685,7 +1687,7 @@
</span><span class="cx"> function bp_is_group() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->groups->current_group )
</del><ins>+        if ( BP_GROUPS_SLUG == $bp->current_component && isset( $bp->groups->current_group ) && $bp->groups->current_group )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkbpcorephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-core.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -1340,7 +1340,7 @@
</span><span class="cx"> function bp_core_render_message() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( $bp->template_message ) {
</del><ins>+        if ( isset( $bp->template_message ) && $bp->template_message ) {
</ins><span class="cx">                 $type = ( 'success' == $bp->template_message_type ) ? 'updated' : 'error';
</span><span class="cx">         ?>
</span><span class="cx">                 <div id="message" class="<?php echo $type; ?>">
</span><span class="lines">@@ -1936,7 +1936,7 @@
</span><span class="cx">
</span><span class="cx"> function bp_core_add_ajax_hook() {
</span><span class="cx">         /* Theme only, we already have the wp_ajax_ hook firing in wp-admin */
</span><del>-        if ( !defined( 'WP_ADMIN' ) )
</del><ins>+        if ( !defined( 'WP_ADMIN' ) && isset( $_REQUEST['action'] ) )
</ins><span class="cx">                 do_action( 'wp_ajax_' . $_REQUEST['action'] );
</span><span class="cx"> }
</span><span class="cx"> add_action( 'init', 'bp_core_add_ajax_hook' );
</span></span></pre></div>
<a id="trunkbpforumsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-forums.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> function bp_forums_is_installed_correctly() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( file_exists( $bp->forums->bbconfig ) )
</del><ins>+        if ( isset( $bp->forums->bbconfig ) && file_exists( $bp->forums->bbconfig ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-classes.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-classes.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-groups/bp-groups-classes.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -292,12 +292,15 @@
</span><span class="cx">         function get_active( $limit = null, $page = null, $user_id = false, $search_terms = false, $populate_extras = true ) {
</span><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><ins>+                $pag_sql = '';
</ins><span class="cx">                 if ( $limit && $page )
</span><span class="cx">                         $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
</span><span class="cx">
</span><ins>+                $hidden_sql = '';
</ins><span class="cx">                 if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
</span><span class="cx">                         $hidden_sql = "AND g.status != 'hidden'";
</span><span class="cx">
</span><ins>+                $search_sql = '';
</ins><span class="cx">                 if ( $search_terms ) {
</span><span class="cx">                         $search_terms = like_escape( $wpdb->escape( $search_terms ) );
</span><span class="cx">                         $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
</span><span class="lines">@@ -312,6 +315,7 @@
</span><span class="cx">                         $total_groups = $wpdb->get_var( "SELECT COUNT(DISTINCT g.id) FROM {$bp->groups->table_name_groupmeta} gm INNER JOIN {$bp->groups->table_name} g ON gm.group_id = g.id WHERE gm.meta_key = 'last_activity'{$hidden_sql} {$search_sql}" );
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+                $group_ids = array();
</ins><span class="cx">                 if ( !empty( $populate_extras ) ) {
</span><span class="cx">                         foreach ( (array)$paged_groups as $group ) $group_ids[] = $group->id;
</span><span class="cx">                         $group_ids = $wpdb->escape( join( ',', (array)$group_ids ) );
</span><span class="lines">@@ -604,6 +608,7 @@
</span><span class="cx">         function get_total_group_count() {
</span><span class="cx">                 global $wpdb, $bp;
</span><span class="cx">
</span><ins>+                $hidden_sql = '';
</ins><span class="cx">                 if ( !is_super_admin() )
</span><span class="cx">                         $hidden_sql = "WHERE status != 'hidden'";
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-templatetags.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-templatetags.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-groups/bp-groups-templatetags.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -147,13 +147,14 @@
</span><span class="cx">
</span><span class="cx">         /* Type */
</span><span class="cx">         if ( 'my-groups' == $bp->current_action ) {
</span><del>-                if ( 'most-popular' == $order )
</del><ins>+                if ( 'most-popular' == $order ) {
</ins><span class="cx">                         $type = 'popular';
</span><del>-                else if ( 'alphabetically' == $order )
</del><ins>+                } elseif ( 'alphabetically' == $order ) {
</ins><span class="cx">                         $type = 'alphabetical';
</span><del>-        } else if ( 'invites' == $bp->current_action ) {
</del><ins>+                }
+        } elseif ( 'invites' == $bp->current_action ) {
</ins><span class="cx">                 $type = 'invites';
</span><del>-        } else if ( $bp->groups->current_group->slug ) {
</del><ins>+        } elseif ( isset( $bp->groups->current_group->slug ) && $bp->groups->current_group->slug ) {
</ins><span class="cx">                 $type = 'single-group';
</span><span class="cx">                 $slug = $bp->groups->current_group->slug;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbpmessagesbpmessagestemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-templatetags.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-templatetags.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-messages/bp-messages-templatetags.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -504,7 +504,7 @@
</span><span class="cx">                 if ( bp_is_my_profile() || !is_user_logged_in() )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . bp_core_get_username( $bp->displayed_user->user_id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
</del><ins>+                return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->messages->slug . '/compose/?r=' . bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/ajax.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/ajax.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-themes/bp-default/_inc/ajax.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -59,7 +59,27 @@
</span><span class="cx">         /* Now pass the querystring to override default values. */
</span><span class="cx">         $query_string = empty( $qs ) ? '' : join( '&', (array)$qs );
</span><span class="cx">
</span><del>-        return apply_filters( 'bp_dtheme_ajax_querystring', $query_string, $object, $_BP_COOKIE['bp-' . $object . '-filter'], $_BP_COOKIE['bp-' . $object . '-scope'], $_BP_COOKIE['bp-' . $object . '-page'], $_BP_COOKIE['bp-' . $object . '-search-terms'], $_BP_COOKIE['bp-' . $object . '-extras'] );
</del><ins>+        $object_filter = '';
+        if ( isset( $_BP_COOKIE['bp-' . $object . '-filter'] ) )
+                $object_filter = $_BP_COOKIE['bp-' . $object . '-filter'];
+
+        $object_scope = '';
+        if ( isset( $_BP_COOKIE['bp-' . $object . '-scope'] ) )
+                $object_scope = $_BP_COOKIE['bp-' . $object . '-scope'];
+
+        $object_page = '';
+        if ( isset( $_BP_COOKIE['bp-' . $object . '-page'] ) )
+                $object_page = $_BP_COOKIE['bp-' . $object . '-page'];
+
+        $object_search_terms = '';
+        if ( isset( $_BP_COOKIE['bp-' . $object . '-search-terms'] ) )
+                $object_search_terms = $_BP_COOKIE['bp-' . $object . '-search-terms'];
+
+        $object_extras = '';
+        if ( isset( $_BP_COOKIE['bp-' . $object . '-extras'] ) )
+                $object_extras = $_BP_COOKIE['bp-' . $object . '-extras'];
+
+        return apply_filters( 'bp_dtheme_ajax_querystring', $query_string, $object, $object_filter, $object_scope, $object_page, $object_search_terms, $object_extras );
</ins><span class="cx"> }
</span><span class="cx"> add_filter( 'bp_ajax_querystring', 'bp_dtheme_ajax_querystring', 10, 2 );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/functions.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/functions.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-themes/bp-default/functions.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -33,9 +33,12 @@
</span><span class="cx">         'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
</span><span class="cx">         'show_all' => __( 'Show all', 'buddypress' ),
</span><span class="cx">         'comments' => __( 'comments', 'buddypress' ),
</span><del>-        'close' => __( 'Close', 'buddypress' ),
-        'mention_explain' => sprintf( __( "%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress' ), '@' . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) )
</del><ins>+        'close' => __( 'Close', 'buddypress' )
</ins><span class="cx"> );
</span><ins>+
+if ( bp_is_profile_component() && !bp_is_directory() )
+        $params['mention_explain'] = sprintf( __( "%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.", 'buddypress' ), '@' . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) );
+
</ins><span class="cx"> wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params );
</span><span class="cx">
</span><span class="cx"> /**
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofilecssjsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-cssjs.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-cssjs.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-xprofile/bp-xprofile-cssjs.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -6,7 +6,7 @@
</span><span class="cx"> add_action( 'admin_menu', 'xprofile_add_admin_css' );
</span><span class="cx">
</span><span class="cx"> function xprofile_add_admin_js() {
</span><del>-        if ( strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
</del><ins>+        if ( isset( $_GET['page'] ) && strpos( $_GET['page'], 'bp-profile-setup' ) !== false ) {
</ins><span class="cx">                 wp_enqueue_script( 'jquery-ui-core' );
</span><span class="cx">                 wp_enqueue_script( 'jquery-ui-tabs' );
</span><span class="cx">                 wp_enqueue_script( 'jquery-ui-mouse' );
</span></span></pre></div>
<a id="trunkbpxprofilephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile.php (3364 => 3365)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile.php        2010-11-06 17:54:55 UTC (rev 3364)
+++ trunk/bp-xprofile.php        2010-11-06 19:04:00 UTC (rev 3365)
</span><span class="lines">@@ -18,6 +18,9 @@
</span><span class="cx"> function xprofile_setup_globals() {
</span><span class="cx">         global $bp, $wpdb;
</span><span class="cx">
</span><ins>+        if ( isset( $bp->profile->id ) )
+                return;
+
</ins><span class="cx">         if ( !defined( 'BP_XPROFILE_SLUG' ) )
</span><span class="cx">                 define ( 'BP_XPROFILE_SLUG', 'profile' );
</span><span class="cx">
</span><span class="lines">@@ -600,6 +603,10 @@
</span><span class="cx"> function xprofile_get_field_data( $field, $user_id = null ) {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><ins>+        // This is required because of a call to bp_core_get_user_displayname() in bp_core_setup_globals()
+        if ( !isset( $bp->profile->id ) )
+                xprofile_setup_globals();
+
</ins><span class="cx">         if ( !$user_id )
</span><span class="cx">                 $user_id = $bp->displayed_user->id;
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>