<!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 &amp;&amp; $page )
</span><span class="cx">                         $pag_sql = $wpdb-&gt;prepare( &quot;LIMIT %d, %d&quot;, 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-&gt;type &amp;&amp; $activity-&gt;mptt_left &amp;&amp; $activity-&gt;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 =&gt; $activity )
</span><del>-                        $activities[$key]-&gt;children = $activity_comments[$activity-&gt;id];
</del><ins>+                        if ( isset( $activity_comments[$activity-&gt;id] ) )
+                                $activities[$key]-&gt;children = $activity_comments[$activity-&gt;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-&gt;activity-&gt;children )
</del><ins>+                if ( !isset( $activities_template-&gt;activity-&gt;children ) || !$activities_template-&gt;activity-&gt;children )
</ins><span class="cx">                         return false;
</span><span class="cx"> 
</span><span class="cx">                 $comments_html = bp_activity_recurse_comments( $activities_template-&gt;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-&gt;activity-&gt;children )
</del><ins>+                if ( !isset( $activities_template-&gt;activity-&gt;children ) || !$activities_template-&gt;activity-&gt;children )
</ins><span class="cx">                         return 0;
</span><span class="cx"> 
</span><span class="cx">                 $count = bp_activity_recurse_comment_count( $activities_template-&gt;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-&gt;activity-&gt;id . '/' )
</del><ins>+                if ( isset( $_GET['ac'] ) &amp;&amp; $_GET['ac'] == $activities_template-&gt;activity-&gt;id . '/' )
</ins><span class="cx">                         return 'style=&quot;display: block&quot;';
</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-&gt;loggedin_user-&gt;domain . $bp-&gt;activity-&gt;slug . '/?r=' . bp_core_get_username( $bp-&gt;displayed_user-&gt;user_id, $bp-&gt;displayed_user-&gt;userdata-&gt;user_nicename, $bp-&gt;displayed_user-&gt;userdata-&gt;user_login ) ) );
</del><ins>+                return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( $bp-&gt;loggedin_user-&gt;domain . $bp-&gt;activity-&gt;slug . '/?r=' . bp_core_get_username( $bp-&gt;displayed_user-&gt;id, $bp-&gt;displayed_user-&gt;userdata-&gt;user_nicename, $bp-&gt;displayed_user-&gt;userdata-&gt;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' =&gt; $activity-&gt;item_id ) ) )
</span><span class="cx">                                 $redirect = bp_get_group_permalink( $group ) . $bp-&gt;activity-&gt;slug . '/' . $activity-&gt;id . '/';
</span><span class="cx">                 }
</span><del>-        } else
</del><ins>+        } else {
</ins><span class="cx">                 $redirect = bp_core_get_user_domain( $activity-&gt;user_id, $activity-&gt;user_nicename, $activity-&gt;user_login ) . $bp-&gt;activity-&gt;slug . '/' . $activity-&gt;id;
</span><ins>+        }
</ins><span class="cx"> 
</span><span class="cx">         $redirect = apply_filters( 'bp_activity_permalink_redirect_url', $redirect, &amp;$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-&gt;site_options['hide-loggedout-adminbar'] &amp;&amp; !is_user_logged_in() )
</del><ins>+        if ( isset( $bp-&gt;site_options['hide-loggedout-adminbar'] ) &amp;&amp; (int)$bp-&gt;site_options['hide-loggedout-adminbar'] &amp;&amp; !is_user_logged_in() )
</ins><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="cx">         $bp-&gt;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-&gt;bp_options_nav[$nav_item['slug']] as $subnav_item ) {
</span><del>-                                $link = str_replace( $bp-&gt;displayed_user-&gt;domain, $bp-&gt;loggedin_user-&gt;domain, $subnav_item['link'] );
-                                $name = str_replace( $bp-&gt;displayed_user-&gt;userdata-&gt;user_login, $bp-&gt;loggedin_user-&gt;userdata-&gt;user_login, $subnav_item['name'] );
</del><ins>+                                $link = $subnav_item['link'];
+                                $name = $subnav_item['name'];
+
+                                if ( isset( $bp-&gt;displayed_user-&gt;domain ) )
+                                        $link = str_replace( $bp-&gt;displayed_user-&gt;domain, $bp-&gt;loggedin_user-&gt;domain, $subnav_item['link'] );
+
+                                if ( isset( $bp-&gt;displayed_user-&gt;userdata-&gt;user_login ) )
+                                        $name = str_replace( $bp-&gt;displayed_user-&gt;userdata-&gt;user_login, $bp-&gt;loggedin_user-&gt;userdata-&gt;user_login, $subnav_item['name'] );
+
</ins><span class="cx">                                 $alt = ( 0 == $sub_counter % 2 ) ? ' class=&quot;alt&quot;' : '';
</span><span class="cx">                                 echo '&lt;li' . $alt . '&gt;&lt;a id=&quot;bp-admin-' . $subnav_item['css_id'] . '&quot; href=&quot;' . $link . '&quot;&gt;' . $name . '&lt;/a&gt;&lt;/li&gt;';
</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') &amp;&amp; $_GET['action'] != 'register' )
</del><ins>+        $action = '';
+        if ( isset( $_GET['action'] ) )
+                $action = $_GET['action'];
+
+        if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php' ) &amp;&amp; $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-&gt;ajax_querystring = apply_filters( 'bp_ajax_querystring', $query_string, $object );
-        return $bp-&gt;ajax_querystring;
</del><ins>+        if ( !isset( $bp-&gt;ajax_querystring ) )
+                $bp-&gt;ajax_querystring = '';
+
+        return apply_filters( 'bp_ajax_querystring', $bp-&gt;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-&gt;current_component || $bp-&gt;core-&gt;profile-&gt;slug == $bp-&gt;current_component )
</del><ins>+        if ( defined( 'BP_XPROFILE_SLUG' ) &amp;&amp; BP_XPROFILE_SLUG == $bp-&gt;current_component || isset( $bp-&gt;core-&gt;profile-&gt;slug ) &amp;&amp; $bp-&gt;core-&gt;profile-&gt;slug == $bp-&gt;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-&gt;current_component &amp;&amp; $bp-&gt;groups-&gt;current_group )
</del><ins>+        if ( BP_GROUPS_SLUG == $bp-&gt;current_component &amp;&amp; isset( $bp-&gt;groups-&gt;current_group ) &amp;&amp; $bp-&gt;groups-&gt;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-&gt;template_message ) {
</del><ins>+        if ( isset( $bp-&gt;template_message ) &amp;&amp; $bp-&gt;template_message ) {
</ins><span class="cx">                 $type = ( 'success' == $bp-&gt;template_message_type ) ? 'updated' : 'error';
</span><span class="cx">         ?&gt;
</span><span class="cx">                 &lt;div id=&quot;message&quot; class=&quot;&lt;?php echo $type; ?&gt;&quot;&gt;
</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' ) &amp;&amp; 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-&gt;forums-&gt;bbconfig ) )
</del><ins>+        if ( isset( $bp-&gt;forums-&gt;bbconfig ) &amp;&amp; file_exists( $bp-&gt;forums-&gt;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 &amp;&amp; $page )
</span><span class="cx">                         $pag_sql = $wpdb-&gt;prepare( &quot; LIMIT %d, %d&quot;, 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() &amp;&amp; ( $user_id != $bp-&gt;loggedin_user-&gt;id ) ) )
</span><span class="cx">                         $hidden_sql = &quot;AND g.status != 'hidden'&quot;;
</span><span class="cx"> 
</span><ins>+                $search_sql = '';
</ins><span class="cx">                 if ( $search_terms ) {
</span><span class="cx">                         $search_terms = like_escape( $wpdb-&gt;escape( $search_terms ) );
</span><span class="cx">                         $search_sql = &quot; AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )&quot;;
</span><span class="lines">@@ -312,6 +315,7 @@
</span><span class="cx">                         $total_groups = $wpdb-&gt;get_var( &quot;SELECT COUNT(DISTINCT g.id) FROM {$bp-&gt;groups-&gt;table_name_groupmeta} gm INNER JOIN {$bp-&gt;groups-&gt;table_name} g ON gm.group_id = g.id WHERE gm.meta_key = 'last_activity'{$hidden_sql} {$search_sql}&quot; );
</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-&gt;id;
</span><span class="cx">                         $group_ids = $wpdb-&gt;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 = &quot;WHERE status != 'hidden'&quot;;
</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-&gt;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-&gt;current_action ) {
</del><ins>+                }
+        } elseif ( 'invites' == $bp-&gt;current_action ) {
</ins><span class="cx">                 $type = 'invites';
</span><del>-        } else if ( $bp-&gt;groups-&gt;current_group-&gt;slug ) {
</del><ins>+        } elseif ( isset( $bp-&gt;groups-&gt;current_group-&gt;slug ) &amp;&amp; $bp-&gt;groups-&gt;current_group-&gt;slug ) {
</ins><span class="cx">                 $type = 'single-group';
</span><span class="cx">                 $slug = $bp-&gt;groups-&gt;current_group-&gt;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-&gt;loggedin_user-&gt;domain . $bp-&gt;messages-&gt;slug . '/compose/?r=' . bp_core_get_username( $bp-&gt;displayed_user-&gt;user_id, $bp-&gt;displayed_user-&gt;userdata-&gt;user_nicename, $bp-&gt;displayed_user-&gt;userdata-&gt;user_login ) ) );
</del><ins>+                return apply_filters( 'bp_get_send_private_message_link', wp_nonce_url( $bp-&gt;loggedin_user-&gt;domain . $bp-&gt;messages-&gt;slug . '/compose/?r=' . bp_core_get_username( $bp-&gt;displayed_user-&gt;id, $bp-&gt;displayed_user-&gt;userdata-&gt;user_nicename, $bp-&gt;displayed_user-&gt;userdata-&gt;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( '&amp;', (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' =&gt; __( 'Show all comments for this thread', 'buddypress' ),
</span><span class="cx">         'show_all'          =&gt; __( 'Show all', 'buddypress' ),
</span><span class="cx">         'comments'          =&gt; __( 'comments', 'buddypress' ),
</span><del>-        'close'             =&gt; __( 'Close', 'buddypress' ),
-        'mention_explain'   =&gt; sprintf( __( &quot;%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.&quot;, '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'             =&gt; __( 'Close', 'buddypress' )
</ins><span class="cx"> );
</span><ins>+
+if ( bp_is_profile_component() &amp;&amp; !bp_is_directory() )
+        $params['mention_explain'] = sprintf( __( &quot;%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.&quot;, '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'] ) &amp;&amp; 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-&gt;profile-&gt;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-&gt;profile-&gt;id ) )
+                xprofile_setup_globals();
+
</ins><span class="cx">         if ( !$user_id )
</span><span class="cx">                 $user_id = $bp-&gt;displayed_user-&gt;id;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>