<!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][5072] trunk: Audit _is_ functions and _current_component_ functions.</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><a href="http://buddypress.trac.wordpress.org/changeset/5072">5072</a></dd>
<dt>Author</dt> <dd>johnjamesjacoby</dd>
<dt>Date</dt> <dd>2011-08-31 01:12:04 +0000 (Wed, 31 Aug 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Audit _is_ functions and _current_component_ functions. Props r-a-y. Fixes <a href="http://buddypress.trac.wordpress.org/ticket/3399">#3399</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityactionsphp">trunk/bp-activity/bp-activity-actions.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatephp">trunk/bp-core/bp-core-template.php</a></li>
<li><a href="#trunkbpforumsbpforumstemplatephp">trunk/bp-forums/bp-forums-template.php</a></li>
<li><a href="#trunkbpmembersbpmembersscreensphp">trunk/bp-members/bp-members-screens.php</a></li>
<li><a href="#trunkbpmessagesbpmessagestemplatephp">trunk/bp-messages/bp-messages-template.php</a></li>
<li><a href="#trunkbpthemesbpdefaultsidebarphp">trunk/bp-themes/bp-default/sidebar.php</a></li>
<li><a href="#trunkbpxprofilebpxprofileactionsphp">trunk/bp-xprofile/bp-xprofile-actions.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-actions.php (5071 => 5072)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-actions.php        2011-08-31 00:35:51 UTC (rev 5071)
+++ trunk/bp-activity/bp-activity-actions.php        2011-08-31 01:12:04 UTC (rev 5072)
</span><span class="lines">@@ -241,7 +241,7 @@
</span><span class="cx"> function bp_activity_action_sitewide_feed() {
</span><span class="cx">         global $bp, $wp_query;
</span><span class="cx">
</span><del>-        if ( !bp_is_current_component( 'activity' ) || !bp_is_current_action( 'feed' ) || bp_is_user() || !empty( $bp->groups->current_group ) )
</del><ins>+        if ( !bp_is_activity_component() || !bp_is_current_action( 'feed' ) || bp_is_user() || !empty( $bp->groups->current_group ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $wp_query->is_404 = false;
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx"> function bp_activity_action_personal_feed() {
</span><span class="cx">         global $bp, $wp_query;
</span><span class="cx">
</span><del>-        if ( !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( 'feed' ) )
</del><ins>+        if ( !bp_is_user_activity() || !bp_is_current_action( 'feed' ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $wp_query->is_404 = false;
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx"> function bp_activity_action_friends_feed() {
</span><span class="cx">         global $bp, $wp_query;
</span><span class="cx">
</span><del>-        if ( !bp_is_active( 'friends' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( bp_get_friends_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
</del><ins>+        if ( !bp_is_active( 'friends' ) || !bp_is_user_activity() || !bp_is_current_action( bp_get_friends_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $wp_query->is_404 = false;
</span><span class="lines">@@ -283,7 +283,7 @@
</span><span class="cx"> function bp_activity_action_my_groups_feed() {
</span><span class="cx">         global $bp, $wp_query;
</span><span class="cx">
</span><del>-        if ( !bp_is_active( 'groups' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( bp_get_groups_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
</del><ins>+        if ( !bp_is_active( 'groups' ) || !bp_is_user_activity() || !bp_is_current_action( bp_get_groups_slug() ) || !bp_is_action_variable( 'feed', 0 ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $wp_query->is_404 = false;
</span><span class="lines">@@ -297,7 +297,7 @@
</span><span class="cx"> function bp_activity_action_mentions_feed() {
</span><span class="cx">         global $bp, $wp_query;
</span><span class="cx">
</span><del>-        if ( !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( 'mentions' ) || !bp_is_action_variable( 'feed', 0 ) )
</del><ins>+        if ( !bp_is_user_activity() || !bp_is_current_action( 'mentions' ) || !bp_is_action_variable( 'feed', 0 ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $wp_query->is_404 = false;
</span><span class="lines">@@ -311,7 +311,7 @@
</span><span class="cx"> function bp_activity_action_favorites_feed() {
</span><span class="cx">         global $bp, $wp_query;
</span><span class="cx">
</span><del>-        if ( !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( 'favorites' ) || !bp_is_action_variable( 'feed', 0 ) )
</del><ins>+        if ( !bp_is_user_activity() || !bp_is_current_action( 'favorites' ) || !bp_is_action_variable( 'feed', 0 ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $wp_query->is_404 = false;
</span><span class="lines">@@ -322,4 +322,4 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
</span><span class="cx">
</span><del>-?>
</del><span class="cx">\ No newline at end of file
</span><ins>+?>
</ins></span></pre></div>
<a id="trunkbpcorebpcoretemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-template.php (5071 => 5072)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-template.php        2011-08-31 00:35:51 UTC (rev 5071)
+++ trunk/bp-core/bp-core-template.php        2011-08-31 01:12:04 UTC (rev 5072)
</span><span class="lines">@@ -586,9 +586,8 @@
</span><span class="cx"> */
</span><span class="cx"> function bp_action_variable( $position = 0 ) {
</span><span class="cx">         $action_variables = bp_action_variables();
</span><ins>+        $action_variable = isset( $action_variables[$position] ) ? $action_variables[$position] : false;
</ins><span class="cx">
</span><del>-        $action_variable = isset( $action_variables[$position] ) ? $action_variables[$position] : false;
-
</del><span class="cx">         return apply_filters( 'bp_action_variable', $action_variable, $position );
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -653,8 +652,9 @@
</span><span class="cx">                         $component_name = $bp->active_components[$component];
</span><span class="cx">
</span><span class="cx">                         // Component has specific root slug
</span><del>-                        if ( !empty( $bp->{$component_name}->root_slug ) )
</del><ins>+                        if ( !empty( $bp->{$component_name}->root_slug ) ) {
</ins><span class="cx">                                 $root_slug = $bp->{$component_name}->root_slug;
</span><ins>+                        }
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // No specific root slug, so fall back to component slug
</span><span class="lines">@@ -717,8 +717,6 @@
</span><span class="cx">          * @since 1.5
</span><span class="cx">          */
</span><span class="cx">         function bp_get_search_slug() {
</span><del>-                global $bp;
-
</del><span class="cx">                 return apply_filters( 'bp_get_search_slug', BP_SEARCH_SLUG );
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -966,7 +964,7 @@
</span><span class="cx"> * @return bool True if it's a non-BP page, false otherwise
</span><span class="cx"> */
</span><span class="cx"> function bp_is_blog_page() {
</span><del>-        global $bp, $wp_query;
</del><ins>+        global $wp_query;
</ins><span class="cx">
</span><span class="cx">         $is_blog_page = false;
</span><span class="cx">
</span><span class="lines">@@ -980,8 +978,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_page( $page ) {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( !bp_is_user() && bp_is_current_component( $page ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1002,6 +998,13 @@
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function bp_is_members_component() {
+        if ( bp_is_current_component( 'members' ) )
+                return true;
+
+        return false;
+}
+
</ins><span class="cx"> function bp_is_profile_component() {
</span><span class="cx">         if ( bp_is_current_component( 'xprofile' ) )
</span><span class="cx">                 return true;
</span><span class="lines">@@ -1031,7 +1034,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_friends_component() {
</span><del>-
</del><span class="cx">         if ( bp_is_current_component( 'friends' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1064,7 +1066,7 @@
</span><span class="cx"> function bp_is_single_activity() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( bp_is_current_component( 'activity' ) && is_numeric( $bp->current_action ) )
</del><ins>+        if ( bp_is_activity_component() && is_numeric( $bp->current_action ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="lines">@@ -1093,41 +1095,45 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_activity() {
</span><del>-        global $bp;
-
-        if ( bp_is_current_component( 'activity' ) )
</del><ins>+        if ( bp_is_user() && bp_is_activity_component() )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_friends_activity() {
</span><del>-        global $bp;
</del><span class="cx">
</span><span class="cx">         if ( !bp_is_active( 'friends' ) )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><del>-        if ( bp_is_activity_component() && bp_is_current_action( bp_get_friends_slug() ) )
</del><ins>+        $slug = bp_get_friends_slug();
+
+        if ( empty( $slug ) )
+                $slug = 'friends';
+
+        if ( bp_is_user_activity() && bp_is_current_action( $slug ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_groups_activity() {
</span><del>-        global $bp;
</del><span class="cx">
</span><span class="cx">         if ( !bp_is_active( 'groups' ) )
</span><span class="cx">                 return false;
</span><span class="cx">
</span><del>-        if ( bp_is_activity_component() && bp_is_current_action( bp_get_groups_slug() ) )
</del><ins>+        $slug = bp_get_groups_slug();
+
+        if ( empty( $slug ) )
+                $slug = 'groups';
+
+        if ( bp_is_user_activity() && bp_is_current_action( $slug ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_profile() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_profile_component() || bp_is_current_component( 'profile' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1135,8 +1141,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_profile_edit() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_profile_component() && bp_is_current_action( 'edit' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1144,9 +1148,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_change_avatar() {
</span><del>-        global $bp;
-
-        if ( bp_is_current_component( 'xprofile' ) && bp_is_current_action( 'change-avatar' ) )
</del><ins>+        if ( bp_is_profile_component() && bp_is_current_action( 'change-avatar' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="lines">@@ -1160,7 +1162,7 @@
</span><span class="cx"> * @return bool
</span><span class="cx"> */
</span><span class="cx"> function bp_is_user_forums() {
</span><del>-        if ( bp_is_current_component( 'forums' ) )
</del><ins>+        if ( bp_is_user() && bp_is_forums_component() )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="lines">@@ -1175,7 +1177,7 @@
</span><span class="cx"> * @return bool
</span><span class="cx"> */
</span><span class="cx"> function bp_is_user_forums_started() {
</span><del>-        if ( bp_is_current_component( 'forums' ) && bp_is_current_action( 'topics' ) )
</del><ins>+        if ( bp_is_user_forums && bp_is_current_action( 'topics' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="lines">@@ -1190,60 +1192,49 @@
</span><span class="cx"> * @return bool
</span><span class="cx"> */
</span><span class="cx"> function bp_is_user_forums_replied_to() {
</span><del>-        if ( bp_is_current_component( 'forums' ) && bp_is_current_action( 'replies' ) )
</del><ins>+        if ( bp_is_user_forums && bp_is_current_action( 'replies' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_groups() {
</span><del>-        global $bp;
-
-        if ( bp_is_current_component( 'groups' ) )
</del><ins>+        if ( bp_is_user() && bp_is_groups_component() )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_blogs() {
</span><del>-        global $bp;
-
-        if ( is_multisite() && bp_is_current_component( 'blogs' ) )
</del><ins>+        if ( bp_is_user() && bp_is_blogs_component() )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_recent_posts() {
</span><del>-        global $bp;
-
-        if ( is_multisite() && bp_is_current_component( 'blogs' ) && bp_is_current_action( 'recent-posts' ) )
</del><ins>+        if ( bp_is_user_blogs() && bp_is_current_action( 'recent-posts' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_recent_commments() {
</span><del>-        global $bp;
-
-        if ( is_multisite() && bp_is_current_component( 'blogs' ) && bp_is_current_action( 'recent-comments' ) )
</del><ins>+        if ( bp_is_user_blogs() && bp_is_current_action( 'recent-comments' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_friends() {
</span><del>-
-        if ( bp_is_current_component( 'friends' ) )
</del><ins>+        if ( bp_is_user() && bp_is_friends_component() )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_user_friend_requests() {
</span><del>-        global $bp;
-
-        if ( bp_is_current_component( 'friends' ) && bp_is_current_action( 'requests' ) )
</del><ins>+        if ( bp_is_user_friends() && bp_is_current_action( 'requests' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="lines">@@ -1261,8 +1252,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_home() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_single_item() && bp_is_groups_component() && ( !bp_current_action() || bp_is_current_action( 'home' ) ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1270,8 +1259,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_create() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_groups_component() && bp_is_current_action( 'create' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1279,8 +1266,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_admin_page() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'admin' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1288,8 +1273,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_forum() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'forum' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1297,8 +1280,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_activity() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'activity' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1313,8 +1294,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_forum_topic_edit() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'forum' ) && bp_is_action_variable( 'topic', 0 ) && bp_is_action_variable( 'edit', 2 ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1322,8 +1301,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_members() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_single_item() && bp_is_groups_component() && bp_is_current_action( 'members' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1331,8 +1308,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_invites() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_groups_component() && bp_is_current_action( 'send-invites' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1340,8 +1315,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_membership_request() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_groups_component() && bp_is_current_action( 'request-membership' ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1349,7 +1322,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_leave() {
</span><del>-        global $bp;
</del><span class="cx">
</span><span class="cx">         if ( bp_is_groups_component() && bp_is_single_item() && bp_is_current_action( 'leave-group' ) )
</span><span class="cx">                 return true;
</span><span class="lines">@@ -1358,8 +1330,6 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_group_single() {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_groups_component() && bp_is_single_item() )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1367,9 +1337,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_create_blog() {
</span><del>-        global $bp;
-
-        if ( is_multisite() && bp_is_current_component( 'blogs' ) && bp_is_current_action( 'create' ) )
</del><ins>+        if ( bp_is_blogs_component() && bp_is_current_action( 'create' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="lines">@@ -1378,44 +1346,35 @@
</span><span class="cx"> /** Messages ******************************************************************/
</span><span class="cx">
</span><span class="cx"> function bp_is_user_messages() {
</span><del>-
-        if ( bp_is_current_component( 'messages' ) )
</del><ins>+        if ( bp_is_user() && bp_is_messages_component() )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_messages_inbox() {
</span><del>-        global $bp;
-
-        if ( bp_is_current_component( 'messages' ) && ( !bp_current_action() || bp_is_current_action( 'inbox' ) ) )
</del><ins>+        if ( bp_is_user_messages() && ( !bp_current_action() || bp_is_current_action( 'inbox' ) ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_messages_sentbox() {
</span><del>-        global $bp;
-
-        if ( bp_is_current_component( 'messages' ) && bp_is_current_action( 'sentbox' ) )
</del><ins>+        if ( bp_is_user_messages() && bp_is_current_action( 'sentbox' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_messages_compose_screen() {
</span><del>-        global $bp;
-
-        if ( bp_is_current_component( 'messages' ) && bp_is_current_action( 'compose' ) )
</del><ins>+        if ( bp_is_user_messages() && bp_is_current_action( 'compose' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function bp_is_notices() {
</span><del>-        global $bp;
-
-        if ( bp_is_current_component( 'messages' ) && bp_is_current_action( 'notices' ) )
</del><ins>+        if ( bp_is_user_messages() && bp_is_current_action( 'notices' ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span><span class="lines">@@ -1423,8 +1382,6 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> function bp_is_single( $component, $callback ) {
</span><del>-        global $bp;
-
</del><span class="cx">         if ( bp_is_current_component( $component ) && ( true === call_user_func( $callback ) ) )
</span><span class="cx">                 return true;
</span><span class="cx">
</span><span class="lines">@@ -1461,7 +1418,6 @@
</span><span class="cx">         echo bp_get_the_body_class();
</span><span class="cx"> }
</span><span class="cx">         function bp_get_the_body_class( $wp_classes, $custom_classes = false ) {
</span><del>-                global $bp;
</del><span class="cx">
</span><span class="cx">                 $bp_classes = array();
</span><span class="cx">
</span><span class="lines">@@ -1618,11 +1574,13 @@
</span><span class="cx">
</span><span class="cx">                 // We don't want WordPress blog classes to appear on non-blog pages.
</span><span class="cx">                 if ( !bp_is_blog_page() ) {
</span><ins>+
</ins><span class="cx">                         // Preserve any custom classes already set
</span><del>-                        if ( !empty( $custom_classes ) )
</del><ins>+                        if ( !empty( $custom_classes ) ) {
</ins><span class="cx">                                 $wp_classes = (array) $custom_classes;
</span><del>-                        else
</del><ins>+                        } else {
</ins><span class="cx">                                 $wp_classes = array();
</span><ins>+                        }
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 // Merge WP classes with BP classes
</span><span class="lines">@@ -1633,5 +1591,6 @@
</span><span class="cx">
</span><span class="cx">                 return apply_filters( 'bp_get_the_body_class', $classes, $bp_classes, $wp_classes, $custom_classes );
</span><span class="cx">         }
</span><del>-add_filter( 'body_class', 'bp_get_the_body_class', 10, 2 )
</del><ins>+        add_filter( 'body_class', 'bp_get_the_body_class', 10, 2 );
+
</ins><span class="cx"> ?>
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-template.php (5071 => 5072)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-template.php        2011-08-31 00:35:51 UTC (rev 5071)
+++ trunk/bp-forums/bp-forums-template.php        2011-08-31 01:12:04 UTC (rev 5072)
</span><span class="lines">@@ -1056,9 +1056,9 @@
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-        if ( empty( $topic_id ) && bp_is_current_component( 'groups') && bp_is_current_action( 'forum' ) && bp_is_action_variable( 'topic', 0 ) && bp_action_variable( 1 ) )
</del><ins>+        if ( empty( $topic_id ) && bp_is_groups_component() && bp_is_current_action( 'forum' ) && bp_is_action_variable( 'topic', 0 ) && bp_action_variable( 1 ) )
</ins><span class="cx">                 $topic_id = bp_forums_get_topic_id_from_slug( bp_action_variable( 1 ) );
</span><del>-        elseif ( empty( $topic_id ) && bp_is_current_component( 'forums') && bp_is_current_action( 'topic' ) && bp_action_variable( 0 ) )
</del><ins>+        elseif ( empty( $topic_id ) && bp_is_forums_component() && bp_is_current_action( 'topic' ) && bp_action_variable( 0 ) )
</ins><span class="cx">                 $topic_id = bp_forums_get_topic_id_from_slug( bp_action_variable( 0 ) );
</span><span class="cx">
</span><span class="cx">         if ( empty( $topic_id ) ) {
</span><span class="lines">@@ -1402,4 +1402,4 @@
</span><span class="cx">         function bp_get_forum_topic_count( $user_id = 0 ) {
</span><span class="cx">                 return apply_filters( 'bp_get_forum_topic_count', bp_forums_total_topic_count( $user_id ) );
</span><span class="cx">         }
</span><del>-?>
</del><span class="cx">\ No newline at end of file
</span><ins>+?>
</ins></span></pre></div>
<a id="trunkbpmembersbpmembersscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-screens.php (5071 => 5072)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-screens.php        2011-08-31 00:35:51 UTC (rev 5071)
+++ trunk/bp-members/bp-members-screens.php        2011-08-31 01:12:04 UTC (rev 5072)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> * @uses apply_filters()
</span><span class="cx"> */
</span><span class="cx"> function bp_members_screen_index() {
</span><del>-        if ( !bp_is_user() && bp_is_current_component( 'members' ) ) {
</del><ins>+        if ( !bp_is_user() && bp_is_members_component() ) {
</ins><span class="cx">                 bp_update_is_directory( true, 'members' );
</span><span class="cx">
</span><span class="cx">                 do_action( 'bp_members_screen_index' );
</span><span class="lines">@@ -45,4 +45,4 @@
</span><span class="cx"> add_action( 'bp_screens', 'bp_members_screen_index' );
</span><span class="cx">
</span><span class="cx">
</span><del>-?>
</del><span class="cx">\ No newline at end of file
</span><ins>+?>
</ins></span></pre></div>
<a id="trunkbpmessagesbpmessagestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-messages/bp-messages-template.php (5071 => 5072)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-messages/bp-messages-template.php        2011-08-31 00:35:51 UTC (rev 5071)
+++ trunk/bp-messages/bp-messages-template.php        2011-08-31 01:12:04 UTC (rev 5072)
</span><span class="lines">@@ -722,7 +722,7 @@
</span><span class="cx">         $r = wp_parse_args( $args, $defaults );
</span><span class="cx">         extract( $r, EXTR_SKIP );
</span><span class="cx">
</span><del>-        if ( !$thread_id && bp_is_current_component( 'messages' ) && bp_is_current_action( 'view' ) )
</del><ins>+        if ( !$thread_id && bp_is_messages_component() && bp_is_current_action( 'view' ) )
</ins><span class="cx">                 $thread_id = (int)bp_action_variable( 0 );
</span><span class="cx">
</span><span class="cx">         $thread_template = new BP_Messages_Thread_Template( $thread_id, $order );
</span><span class="lines">@@ -879,4 +879,4 @@
</span><span class="cx">         add_filter( 'embed_post_id', 'bp_get_message_thread_id' );
</span><span class="cx"> }
</span><span class="cx"> add_action( 'messages_box_loop_start', 'bp_messages_embed' );
</span><del>-?>
</del><span class="cx">\ No newline at end of file
</span><ins>+?>
</ins></span></pre></div>
<a id="trunkbpthemesbpdefaultsidebarphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/sidebar.php (5071 => 5072)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/sidebar.php        2011-08-31 00:35:51 UTC (rev 5071)
+++ trunk/bp-themes/bp-default/sidebar.php        2011-08-31 01:12:04 UTC (rev 5072)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx">         <?php endif; ?>
</span><span class="cx">
</span><span class="cx">         <?php /* Show forum tags on the forums directory */
</span><del>-        if ( bp_is_active( 'forums' ) && bp_is_current_component( 'forums' ) && bp_is_directory() ) : ?>
</del><ins>+        if ( bp_is_active( 'forums' ) && bp_is_forums_component() && bp_is_directory() ) : ?>
</ins><span class="cx">                 <div id="forum-directory-tags" class="widget tags">
</span><span class="cx">                         <h3 class="widgettitle"><?php _e( 'Forum Topic Tags', 'buddypress' ) ?></h3>
</span><span class="cx">                         <div id="tag-text"><?php bp_forums_tag_heat_map(); ?></div>
</span></span></pre></div>
<a id="trunkbpxprofilebpxprofileactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-xprofile/bp-xprofile-actions.php (5071 => 5072)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-xprofile/bp-xprofile-actions.php        2011-08-31 00:35:51 UTC (rev 5071)
+++ trunk/bp-xprofile/bp-xprofile-actions.php        2011-08-31 01:12:04 UTC (rev 5072)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> function xprofile_action_delete_avatar() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( !bp_is_current_component( 'profile' ) || !bp_is_current_action( 'change-avatar' ) || !bp_is_action_variable( 'delete-avatar', 0 ) )
</del><ins>+        if ( !bp_is_user_change_avatar() || !bp_is_action_variable( 'delete-avatar', 0 ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         // Check the nonce
</span><span class="lines">@@ -41,4 +41,4 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'bp_actions', 'xprofile_action_delete_avatar' );
</span><span class="cx">
</span><del>-?>
</del><span class="cx">\ No newline at end of file
</span><ins>+?>
</ins></span></pre>
</div>
</div>
</body>
</html>