<!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][4137] trunk: Swap function_exists checks to bp_is_active.</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>4137</dd>
<dt>Author</dt> <dd>djpaul</dd>
<dt>Date</dt> <dd>2011-03-12 21:25:51 +0000 (Sat, 12 Mar 2011)</dd>
</dl>
<h3>Log Message</h3>
<pre>Swap function_exists checks to bp_is_active. Fixes #2718</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcorecachephp">trunk/bp-core/bp-core-cache.php</a></li>
<li><a href="#trunkbpcorebpcorewpabstractionphp">trunk/bp-core/bp-core-wpabstraction.php</a></li>
<li><a href="#trunkbpcoredeprecated13php">trunk/bp-core/deprecated/1.3.php</a></li>
<li><a href="#trunkbpforumsbpforumsscreensphp">trunk/bp-forums/bp-forums-screens.php</a></li>
<li><a href="#trunkbpfriendsbpfriendsactivityphp">trunk/bp-friends/bp-friends-activity.php</a></li>
<li><a href="#trunkbpfriendsbpfriendstemplatephp">trunk/bp-friends/bp-friends-template.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsactionsphp">trunk/bp-groups/bp-groups-actions.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsforumsphp">trunk/bp-groups/bp-groups-forums.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsfunctionsphp">trunk/bp-groups/bp-groups-functions.php</a></li>
<li><a href="#trunkbpgroupsbpgroupsscreensphp">trunk/bp-groups/bp-groups-screens.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatephp">trunk/bp-groups/bp-groups-template.php</a></li>
<li><a href="#trunkbpmembersbpmembersactionsphp">trunk/bp-members/bp-members-actions.php</a></li>
<li><a href="#trunkbpmembersbpmemberssignupphp">trunk/bp-members/bp-members-signup.php</a></li>
<li><a href="#trunkbpmembersbpmemberstemplatephp">trunk/bp-members/bp-members-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcorecachephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-cache.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-cache.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-core/bp-core-cache.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -30,9 +30,7 @@
</span><span class="cx"> */
</span><span class="cx"> function bp_core_add_global_group() {
</span><span class="cx">         wp_cache_init();
</span><del>-
-        if ( function_exists( 'wp_cache_add_global_groups' ) )
-                wp_cache_add_global_groups( array( 'bp' ) );
</del><ins>+        wp_cache_add_global_groups( array( 'bp' ) );
</ins><span class="cx"> }
</span><span class="cx"> add_action( 'bp_loaded', 'bp_core_add_global_group' );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpcorebpcorewpabstractionphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-wpabstraction.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-wpabstraction.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-core/bp-core-wpabstraction.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -70,29 +70,10 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-/**
- * bp_core_is_main_site
- *
- * Checks if current blog is root blog of site. Deprecated in 1.3.
- *
- * @deprecated 1.3
- * @deprecated Use is_multisite()
- * @package BuddyPress
- * @param int $blog_id optional blog id to test (default current blog)
- * @return bool True if not multisite or $blog_id is main site
- * @since 1.2.6
- */
-function bp_core_is_main_site( $blog_id = '' ) {
-        _deprecated_function( __FUNCTION__, '1.3', 'is_main_site()' );
-        return is_main_site( $blog_id );
-}
-
</del><span class="cx"> function bp_core_get_status_sql( $prefix = false ) {
</span><span class="cx">         if ( !is_multisite() )
</span><span class="cx">                 return "{$prefix}user_status = 0";
</span><span class="cx">         else
</span><span class="cx">                 return "{$prefix}spam = 0 AND {$prefix}deleted = 0 AND {$prefix}user_status = 0";
</span><span class="cx"> }
</span><del>-
-
</del><span class="cx"> ?>
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpcoredeprecated13php"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/deprecated/1.3.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/deprecated/1.3.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-core/deprecated/1.3.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -31,6 +31,23 @@
</span><span class="cx">         return is_multisite();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+/**
+ * bp_core_is_main_site
+ *
+ * Checks if current blog is root blog of site. Deprecated in 1.3.
+ *
+ * @deprecated 1.3
+ * @deprecated Use is_main_site()
+ * @package BuddyPress
+ * @param int $blog_id optional blog id to test (default current blog)
+ * @return bool True if not multisite or $blog_id is main site
+ * @since 1.2.6
+ */
+function bp_core_is_main_site( $blog_id = '' ) {
+        _deprecated_function( __FUNCTION__, '1.3', 'is_main_site()' );
+        return is_main_site( $blog_id );
+}
+
</ins><span class="cx"> /** Activity ******************************************************************/
</span><span class="cx">
</span><span class="cx"> function bp_is_activity_permalink() {
</span></span></pre></div>
<a id="trunkbpforumsbpforumsscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-screens.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-screens.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-forums/bp-forums-screens.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx">                 do_action( 'bbpress_init' );
</span><span class="cx">
</span><span class="cx">                 // Check to see if the user has posted a new topic from the forums page.
</span><del>-                if ( isset( $_POST['submit_topic'] ) && function_exists( 'bp_forums_new_topic' ) ) {
</del><ins>+                if ( isset( $_POST['submit_topic'] ) && bp_is_active( 'forums' ) ) {
</ins><span class="cx">                         check_admin_referer( 'bp_forums_new_topic' );
</span><span class="cx">
</span><span class="cx">                         if ( $bp->groups->current_group = groups_get_group( array( 'group_id' => $_POST['topic_group_id'] ) ) ) {
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendsactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-activity.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-activity.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-friends/bp-friends-activity.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> function friends_delete_activity( $args ) {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( function_exists('bp_activity_delete_by_item_id') ) {
</del><ins>+        if ( bp_is_active( 'activity' ) ) {
</ins><span class="cx">                 extract( (array)$args );
</span><span class="cx">                 bp_activity_delete_by_item_id( array( 'item_id' => $item_id, 'component' => $bp->friends->id, 'type' => $type, 'user_id' => $user_id, 'secondary_item_id' => $secondary_item_id ) );
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkbpfriendsbpfriendstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-friends/bp-friends-template.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-friends/bp-friends-template.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-friends/bp-friends-template.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx">                                 <a href="<?php echo bp_core_get_user_domain( $user_ids['users'][$i]->user_id ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $user_ids['users'][$i]->user_id, 'type' => 'thumb' ) ) ?></a>
</span><span class="cx">                                 <h5><?php echo bp_core_get_userlink( $user_ids['users'][$i]->user_id ) ?></h5>
</span><span class="cx">
</span><del>-                                <?php if ( function_exists( 'xprofile_get_random_profile_data' ) ) { ?>
</del><ins>+                                <?php if ( bp_is_active( 'xprofile' ) ) { ?>
</ins><span class="cx">
</span><span class="cx">                                         <?php $random_data = xprofile_get_random_profile_data( $user_ids['users'][$i]->user_id, true ); ?>
</span><span class="cx">
</span><span class="lines">@@ -148,7 +148,7 @@
</span><span class="cx">
</span><span class="cx">                                 <div class="action">
</span><span class="cx">
</span><del>-                                        <?php if ( function_exists( 'bp_add_friend_button' ) ) { ?>
</del><ins>+                                        <?php if ( bp_is_active( 'friends' ) ) { ?>
</ins><span class="cx">
</span><span class="cx">                                                 <?php bp_add_friend_button( $user_ids['users'][$i]->user_id ) ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-actions.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-actions.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-groups/bp-groups-actions.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">                                 $group_enable_forum = 0;
</span><span class="cx">                         } else {
</span><span class="cx">                                 // Create the forum if enable_forum = 1
</span><del>-                                if ( function_exists( 'bp_forums_setup' ) && '' == groups_get_groupmeta( $bp->groups->new_group_id, 'forum_id' ) ) {
</del><ins>+                                if ( bp_is_active( 'forums' ) && '' == groups_get_groupmeta( $bp->groups->new_group_id, 'forum_id' ) ) {
</ins><span class="cx">                                         groups_new_group_forum();
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsforumsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-forums.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-forums.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-groups/bp-groups-forums.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">
</span><span class="cx">         $group = new BP_Groups_Group( $group_id );
</span><span class="cx">
</span><del>-        if ( empty( $group->enable_forum ) || !function_exists( 'bp_forums_setup' ) )
</del><ins>+        if ( empty( $group->enable_forum ) || !bp_is_active( 'forums' ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         $args = array(
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx">
</span><span class="cx">         if ( $topic = bp_forums_update_topic( array( 'topic_title' => $topic_title, 'topic_text' => $topic_text, 'topic_id' => $topic_id ) ) ) {
</span><span class="cx">                 // Update the activity stream item
</span><del>-                if ( function_exists( 'bp_activity_delete_by_item_id' ) )
</del><ins>+                if ( bp_is_active( 'activity' ) )
</ins><span class="cx">                         bp_activity_delete_by_item_id( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $topic_id, 'component' => $bp->groups->id, 'type' => 'new_forum_topic' ) );
</span><span class="cx">
</span><span class="cx">                 $activity_action = sprintf( __( '%1$s started the forum topic %2$s in the group %3$s:', 'buddypress'), bp_core_get_userlink( $topic->topic_poster ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'/">' . esc_attr( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . esc_attr( $bp->groups->current_group->name ) . '</a>' );
</span><span class="lines">@@ -163,7 +163,7 @@
</span><span class="cx">                         $primary_link .= "?topic_page=" . $page;
</span><span class="cx">
</span><span class="cx">                 // Fetch an existing entry and update if one exists.
</span><del>-                if ( function_exists( 'bp_activity_get_activity_id' ) )
</del><ins>+                if ( bp_is_active( 'activity' ) )
</ins><span class="cx">                         $id = bp_activity_get_activity_id( array( 'user_id' => $post->poster_id, 'component' => $bp->groups->id, 'type' => 'new_forum_post', 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $post_id ) );
</span><span class="cx">
</span><span class="cx">                 // Update the entry in activity streams
</span><span class="lines">@@ -194,7 +194,7 @@
</span><span class="cx">                 do_action( 'groups_before_delete_group_forum_topic', $topic_id );
</span><span class="cx">
</span><span class="cx">                 // Delete the activity stream item
</span><del>-                if ( function_exists( 'bp_activity_delete' ) )
</del><ins>+                if ( bp_is_active( 'activity' ) )
</ins><span class="cx">                         bp_activity_delete( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $topic_id, 'component' => $bp->groups->id, 'type' => 'new_forum_topic' ) );
</span><span class="cx">
</span><span class="cx">                 do_action( 'groups_delete_group_forum_topic', $topic_id );
</span><span class="lines">@@ -212,7 +212,7 @@
</span><span class="cx">                 do_action( 'groups_before_delete_group_forum_post', $post_id, $topic_id );
</span><span class="cx">
</span><span class="cx">                 // Delete the activity stream item
</span><del>-                if ( function_exists( 'bp_activity_delete' ) )
</del><ins>+                if ( bp_is_active( 'activity' ) )
</ins><span class="cx">                         bp_activity_delete( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $post_id, 'component' => $bp->groups->id, 'type' => 'new_forum_post' ) );
</span><span class="cx">
</span><span class="cx">                 do_action( 'groups_delete_group_forum_post', $post_id, $topic_id );
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-functions.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-functions.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-groups/bp-groups-functions.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -255,7 +255,7 @@
</span><span class="cx">          * joined_group activity so users cannot flood the activity stream by
</span><span class="cx">          * joining/leaving the group in quick succession.
</span><span class="cx">          */
</span><del>-        if ( function_exists( 'bp_activity_delete' ) && gmmktime() <= strtotime( '+5 minutes', (int)strtotime( $membership->date_modified ) ) )
</del><ins>+        if ( bp_is_active( 'activity' ) && gmmktime() <= strtotime( '+5 minutes', (int)strtotime( $membership->date_modified ) ) )
</ins><span class="cx">                 bp_activity_delete( array( 'component' => $bp->groups->id, 'type' => 'joined_group', 'user_id' => $user_id, 'item_id' => $group_id ) );
</span><span class="cx">
</span><span class="cx">         bp_core_add_message( __( 'You successfully left the group.', 'buddypress' ) );
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupsscreensphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-screens.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-screens.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-groups/bp-groups-screens.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -311,7 +311,7 @@
</span><span class="cx">
</span><span class="cx">                 } else {
</span><span class="cx">                         // Posting a topic
</span><del>-                        if ( isset( $_POST['submit_topic'] ) && function_exists( 'bp_forums_new_topic') ) {
</del><ins>+                        if ( isset( $_POST['submit_topic'] ) && bp_is_active( 'forums' ) ) {
</ins><span class="cx">                                 // Check the nonce
</span><span class="cx">                                 check_admin_referer( 'bp_forums_new_topic' );
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-template.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-template.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-groups/bp-groups-template.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -701,7 +701,7 @@
</span><span class="cx">                 if ( !$forum_id = groups_get_groupmeta( $groups_template->group->id, 'forum_id' ) )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><del>-                if ( !function_exists( 'bp_forums_get_forum_topicpost_count' ) )
</del><ins>+                if ( !bp_is_active( 'forums' ) )
</ins><span class="cx">                         return false;
</span><span class="cx">
</span><span class="cx">                 if ( !$groups_template->group->forum_counts )
</span><span class="lines">@@ -735,7 +735,7 @@
</span><span class="cx">                 if ( !$forum_id = groups_get_groupmeta( $groups_template->group->id, 'forum_id' ) )
</span><span class="cx">                         return false;
</span><span class="cx">
</span><del>-                if ( !function_exists( 'bp_forums_get_forum_topicpost_count' ) )
</del><ins>+                if ( !bp_is_active( 'forums' ) )
</ins><span class="cx">                         return false;
</span><span class="cx">
</span><span class="cx">                 if ( !$groups_template->group->forum_counts )
</span><span class="lines">@@ -759,7 +759,7 @@
</span><span class="cx">         if ( !$group )
</span><span class="cx">                 $group =& $groups_template->group;
</span><span class="cx">
</span><del>-        if ( function_exists( 'bp_forums_is_installed_correctly' ) ) {
</del><ins>+        if ( bp_is_active( 'forums' ) ) {
</ins><span class="cx">                 if ( bp_forums_is_installed_correctly() ) {
</span><span class="cx">                         if ( $group->enable_forum )
</span><span class="cx">                                 return true;
</span></span></pre></div>
<a id="trunkbpmembersbpmembersactionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-actions.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-actions.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-members/bp-members-actions.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">                         bp_core_add_message( __( 'User removed as spammer.', 'buddypress' ) );
</span><span class="cx">
</span><span class="cx">                 // Hide this user's activity
</span><del>-                if ( $is_spam && function_exists( 'bp_activity_hide_user_activity' ) )
</del><ins>+                if ( $is_spam && bp_is_active( 'activity' ) )
</ins><span class="cx">                         bp_activity_hide_user_activity( $bp->displayed_user->id );
</span><span class="cx">
</span><span class="cx">                 // We need a special hook for is_spam so that components can
</span></span></pre></div>
<a id="trunkbpmembersbpmemberssignupphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-signup.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-signup.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-members/bp-members-signup.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx">                 $bp->signup->email = $_POST['signup_email'];
</span><span class="cx">
</span><span class="cx">                 // Now we've checked account details, we can check profile information
</span><del>-                if ( function_exists( 'xprofile_check_is_required_field' ) ) {
</del><ins>+                if ( bp_is_active( 'xprofile' ) ) {
</ins><span class="cx">
</span><span class="cx">                         // Make sure hidden field is passed and populated
</span><span class="cx">                         if ( isset( $_POST['signup_profile_field_ids'] ) && !empty( $_POST['signup_profile_field_ids'] ) ) {
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">                 $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->users SET user_status = 2 WHERE ID = %d", $user_id ) );
</span><span class="cx">
</span><span class="cx">                 // Set any profile data
</span><del>-                if ( function_exists( 'xprofile_set_field_data' ) ) {
</del><ins>+                if ( bp_is_active( 'xprofile' ) ) {
</ins><span class="cx">                         if ( !empty( $usermeta['profile_field_ids'] ) ) {
</span><span class="cx">                                 $profile_field_ids = explode( ',', $usermeta['profile_field_ids'] );
</span><span class="cx">
</span><span class="lines">@@ -454,7 +454,7 @@
</span><span class="cx">                 $user_id = $user['user_id'];
</span><span class="cx">
</span><span class="cx">                 // Set any profile data
</span><del>-                if ( function_exists( 'xprofile_set_field_data' ) ) {
</del><ins>+                if ( bp_is_active( 'xprofile' ) ) {
</ins><span class="cx">                         if ( !empty( $user['meta']['profile_field_ids'] ) ) {
</span><span class="cx">                                 $profile_field_ids = explode( ',', $user['meta']['profile_field_ids'] );
</span><span class="cx">
</span><span class="lines">@@ -485,9 +485,7 @@
</span><span class="cx">                 delete_user_meta( $user_id, 'activation_key' );
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        // Support for WP < 3.1
-        if ( ! function_exists( 'wp_update_user' ) )
-                 require_once( ABSPATH . WPINC . '/registration.php' );
</del><ins>+        require_once( ABSPATH . WPINC . '/registration.php' );
</ins><span class="cx">
</span><span class="cx">         // Update the display_name
</span><span class="cx">         wp_update_user( array( 'ID' => $user_id, 'display_name' => bp_core_get_user_displayname( $user_id ) ) );
</span><span class="lines">@@ -533,7 +531,7 @@
</span><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         // Add the user's fullname to Xprofile
</span><del>-        if ( function_exists( 'xprofile_set_field_data' ) ) {
</del><ins>+        if ( bp_is_active( 'xprofile' ) ) {
</ins><span class="cx">                 $firstname = get_user_meta( $user_id, 'first_name', true );
</span><span class="cx">                 $lastname = ' ' . get_user_meta( $user_id, 'last_name', true );
</span><span class="cx">                 $name = $firstname . $lastname;
</span></span></pre></div>
<a id="trunkbpmembersbpmemberstemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-members/bp-members-template.php (4136 => 4137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-members/bp-members-template.php        2011-03-12 20:28:40 UTC (rev 4136)
+++ trunk/bp-members/bp-members-template.php        2011-03-12 21:25:51 UTC (rev 4137)
</span><span class="lines">@@ -560,7 +560,7 @@
</span><span class="cx"> function bp_member_random_profile_data() {
</span><span class="cx">         global $members_template;
</span><span class="cx">
</span><del>-        if ( function_exists( 'xprofile_get_random_profile_data' ) ) { ?>
</del><ins>+        if ( bp_is_active( 'xprofile' ) ) { ?>
</ins><span class="cx">                 <?php $random_data = xprofile_get_random_profile_data( $members_template->member->id, true ); ?>
</span><span class="cx">                         <strong><?php echo wp_filter_kses( $random_data[0]->name ) ?></strong>
</span><span class="cx">                         <?php echo wp_filter_kses( $random_data[0]->value ) ?>
</span><span class="lines">@@ -647,10 +647,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Always add a log out list item to the end of the navigation
</span><del>-        if ( function_exists( 'wp_logout_url' ) )
-                $logout_link = '<li><a id="wp-logout" href="' . wp_logout_url( bp_get_root_domain() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';
-        else
-                $logout_link = '<li><a id="wp-logout" href="' . site_url() . '/wp-login.php?action=logout&amp;redirect_to=' . bp_get_root_domain() . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';
</del><ins>+        $logout_link = '<li><a id="wp-logout" href="' . wp_logout_url( bp_get_root_domain() ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';
</ins><span class="cx">
</span><span class="cx">         echo apply_filters( 'bp_logout_nav_link', $logout_link );
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>