<!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] [2539] trunk: Fixes #1752</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2539</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-02-02 17:54:12 +0000 (Tue, 02 Feb 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixes #1752</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivityphp">trunk/bp-activity.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatetagsphp">trunk/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#trunkbpthemesbpdefault_incoptionsphp">trunk/bp-themes/bp-default/_inc/options.php</a></li>
<li><a href="#trunkbpthemesbpdefaultactivityindexphp">trunk/bp-themes/bp-default/activity/index.php</a></li>
<li><a href="#trunkbpthemesbpdefaultfunctionsphp">trunk/bp-themes/bp-default/functions.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupscreatephp">trunk/bp-themes/bp-default/groups/create.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssingleactivityphp">trunk/bp-themes/bp-default/groups/single/activity.php</a></li>
<li><a href="#trunkbpthemesbpdefaultgroupssingleadminphp">trunk/bp-themes/bp-default/groups/single/admin.php</a></li>
<li><a href="#trunkbpthemesbpdefaultheaderphp">trunk/bp-themes/bp-default/header.php</a></li>
<li><a href="#trunkbpthemesbpdefaulthomephp">trunk/bp-themes/bp-default/home.php</a></li>
<li><a href="#trunkbpthemesbpdefaultmemberssingleactivityphp">trunk/bp-themes/bp-default/members/single/activity.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-activity.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx"> function bp_activity_screen_friends() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( bp_is_deactivated( 'bp-friends.php' ) )
</del><ins>+        if ( !bp_is_active( 'friends' ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         if ( !is_site_admin() )
</span><span class="lines">@@ -173,7 +173,7 @@
</span><span class="cx"> function bp_activity_screen_groups() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><del>-        if ( bp_is_deactivated( 'bp-groups.php' ) )
</del><ins>+        if ( !bp_is_active( 'groups' ) )
</ins><span class="cx">                 return false;
</span><span class="cx">
</span><span class="cx">         if ( !is_site_admin() )
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-templatetags.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-templatetags.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-core/bp-core-templatetags.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -1401,10 +1401,10 @@
</span><span class="cx">
</span><span class="cx"> /* Template is_() functions to determine the current page */
</span><span class="cx">
</span><del>-function bp_is_deactivated( $plugin_file ) {
</del><ins>+function bp_is_active( $component ) {
</ins><span class="cx">         global $bp_deactivated;
</span><span class="cx">
</span><del>-        if ( isset( $bp_deactivated[$plugin_file] ) )
</del><ins>+        if ( !isset( $bp_deactivated[ 'bp-' . $component . '.php' ] ) )
</ins><span class="cx">                 return true;
</span><span class="cx">
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/options.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/options.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-themes/bp-default/_inc/options.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">                                                         <th scope="row"><?php _e( 'On front page show:', 'buddypress' ) ?></th>
</span><span class="cx">                                                         <td>
</span><span class="cx">                                                                 <label><input id="bpdtheme_frontpage_blog" type="radio" name="show_on_frontpage" <?php if ( $bp_dtheme_options['show_on_frontpage'] == 'blog' || empty($bp_dtheme_options['show_on_frontpage']) ) echo 'checked="checked"'; ?> value="blog" /> <?php _e( 'Blog Posts', 'buddypress' ) ?></label><br />
</span><del>-                                                                <?php if ( !bp_is_deactivated('bp-activity.php') ) : ?>
</del><ins>+                                                                <?php if ( bp_is_active( 'activity') ) : ?>
</ins><span class="cx">                                                                         <label><input id="bpdtheme_frontpage_activity" type="radio" name="show_on_frontpage" <?php if ( $bp_dtheme_options['show_on_frontpage'] == 'activity' ) echo 'checked="checked"'; ?> value="activity" /> <?php _e( 'Activity Stream', 'buddypress' ) ?></label>
</span><span class="cx">                                                                 <?php endif; ?>
</span><span class="cx">                                                         </td>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivityindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/index.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/index.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-themes/bp-default/activity/index.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -57,11 +57,21 @@
</span><span class="cx">                                                         <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
</span><span class="cx">                                                         <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
</span><span class="cx">                                                         <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
</span><del>-                                                        <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
-                                                        <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
-                                                        <option value="created_group"><?php _e( 'Show New Groups', 'buddypress' ) ?></option>
-                                                        <option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option>
-                                                        <option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ) ?></option>
</del><ins>+
+                                                        <?php if ( bp_is_active( 'forums' ) ) : ?>
+                                                                <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
+                                                                <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
+                                                        <?php endif; ?>
+
+                                                        <?php if ( bp_is_active( 'groups' ) ) : ?>
+                                                                <option value="created_group"><?php _e( 'Show New Groups', 'buddypress' ) ?></option>
+                                                                <option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option>
+                                                        <?php endif; ?>
+
+                                                        <?php if ( bp_is_active( 'friends' ) ) : ?>
+                                                                <option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ) ?></option>
+                                                        <?php endif; ?>
+
</ins><span class="cx">                                                         <option value="new_member"><?php _e( 'Show New Members', 'buddypress' ) ?></option>
</span><span class="cx">
</span><span class="cx">                                                         <?php do_action( 'bp_activity_filter_options' ) ?>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/functions.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/functions.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-themes/bp-default/functions.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -228,7 +228,7 @@
</span><span class="cx">         if ( !is_home() )
</span><span class="cx">                 return apply_filters( 'bp_dtheme_body_class_home', $classes, $bp_classes, $wp_classes, $custom_classes );
</span><span class="cx">
</span><del>-        if ( !bp_is_deactivated('bp-activity.php') ) {
</del><ins>+        if ( bp_is_active( 'activity' ) ) {
</ins><span class="cx">                 if ( 'activity' == bp_dtheme_show_on_frontpage() ) {
</span><span class="cx">                         $blog = array_keys( $classes, 'blog-page' );
</span><span class="cx">                         $classes[$blog[0]] = 'activity';
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupscreatephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/create.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/create.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-themes/bp-default/groups/create.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">                                         </div>
</span><span class="cx">                                         <?php endif; ?>
</span><span class="cx">
</span><del>-                                        <?php if ( function_exists('bp_forums_setup') ) : ?>
</del><ins>+                                        <?php if ( function_exists('bp_forums_is_installed_correctly') ) : ?>
</ins><span class="cx">                                                 <?php if ( bp_forums_is_installed_correctly() ) : ?>
</span><span class="cx">                                                         <div class="checkbox">
</span><span class="cx">                                                                 <label><input type="checkbox" name="group-show-forum" id="group-show-forum" value="1"<?php if ( bp_get_new_group_enable_forum() ) { ?> checked="checked"<?php } ?> /> <?php _e('Enable discussion forum', 'buddypress') ?></label>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssingleactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/activity.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/activity.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-themes/bp-default/groups/single/activity.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -8,8 +8,12 @@
</span><span class="cx">                         <select>
</span><span class="cx">                                 <option value="-1"><?php _e( 'No Filter', 'buddypress' ) ?></option>
</span><span class="cx">                                 <option value="activity_update"><?php _e( 'Show Updates', 'buddypress' ) ?></option>
</span><del>-                                <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
-                                <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
</del><ins>+
+                                <?php if ( bp_is_active( 'forums' ) ) : ?>
+                                        <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
+                                        <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
+                                <?php endif; ?>
+
</ins><span class="cx">                                 <option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option>
</span><span class="cx">
</span><span class="cx">                                 <?php do_action( 'bp_group_activity_filter_options' ) ?>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultgroupssingleadminphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/groups/single/admin.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/groups/single/admin.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-themes/bp-default/groups/single/admin.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">
</span><span class="cx">         <?php endif; ?>
</span><span class="cx">
</span><del>-        <?php if ( function_exists('bp_forums_setup') ) : ?>
</del><ins>+        <?php if ( function_exists('bp_forums_is_installed_correctly') ) : ?>
</ins><span class="cx">
</span><span class="cx">                 <?php if ( bp_forums_is_installed_correctly() ) : ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/header.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/header.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-themes/bp-default/header.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">                                         <a href="<?php echo site_url() ?>" title="<?php _e( 'Home', 'buddypress' ) ?>"><?php _e( 'Home', 'buddypress' ) ?></a>
</span><span class="cx">                                 </li>
</span><span class="cx">
</span><del>-                                <?php if ( !bp_is_deactivated('bp-activity.php') ) : ?>
</del><ins>+                                <?php if ( bp_is_active( 'activity' ) ) : ?>
</ins><span class="cx">                                         <?php if ( 'blog' == bp_dtheme_show_on_frontpage() ) : ?>
</span><span class="cx">                                                 <li<?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?> class="selected"<?php endif; ?>>
</span><span class="cx">                                                         <a href="<?php echo site_url() ?>/<?php echo BP_ACTIVITY_SLUG ?>/" title="<?php _e( 'Activity', 'buddypress' ) ?>"><?php _e( 'Activity', 'buddypress' ) ?></a>
</span><span class="lines">@@ -64,19 +64,19 @@
</span><span class="cx">                                         <a href="<?php echo site_url() ?>/<?php echo BP_MEMBERS_SLUG ?>/" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a>
</span><span class="cx">                                 </li>
</span><span class="cx">
</span><del>-                                <?php if ( function_exists( 'groups_install' ) ) : ?>
</del><ins>+                                <?php if ( bp_is_active( 'groups' ) ) : ?>
</ins><span class="cx">                                         <li<?php if ( bp_is_page( BP_GROUPS_SLUG ) || bp_is_group() ) : ?> class="selected"<?php endif; ?>>
</span><span class="cx">                                                 <a href="<?php echo site_url() ?>/<?php echo BP_GROUPS_SLUG ?>/" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a>
</span><span class="cx">                                         </li>
</span><span class="cx">                                 <?php endif; ?>
</span><span class="cx">
</span><del>-                                <?php if ( function_exists( 'groups_install' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) get_site_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?>
</del><ins>+                                <?php if ( bp_is_active( 'forums' ) && ( function_exists( 'bp_forums_is_installed_correctly' ) && !(int) get_site_option( 'bp-disable-forum-directory' ) ) && bp_forums_is_installed_correctly() ) : ?>
</ins><span class="cx">                                         <li<?php if ( bp_is_page( BP_FORUMS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
</span><span class="cx">                                                 <a href="<?php echo site_url() ?>/<?php echo BP_FORUMS_SLUG ?>/" title="<?php _e( 'Forums', 'buddypress' ) ?>"><?php _e( 'Forums', 'buddypress' ) ?></a>
</span><span class="cx">                                         </li>
</span><span class="cx">                                 <?php endif; ?>
</span><span class="cx">
</span><del>-                                <?php if ( function_exists( 'bp_blogs_install' ) && bp_core_is_multisite() ) : ?>
</del><ins>+                                <?php if ( bp_is_active( 'blogs' ) && bp_core_is_multisite() ) : ?>
</ins><span class="cx">                                         <li<?php if ( bp_is_page( BP_BLOGS_SLUG ) ) : ?> class="selected"<?php endif; ?>>
</span><span class="cx">                                                 <a href="<?php echo site_url() ?>/<?php echo BP_BLOGS_SLUG ?>/" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a>
</span><span class="cx">                                         </li>
</span></span></pre></div>
<a id="trunkbpthemesbpdefaulthomephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/home.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/home.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-themes/bp-default/home.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx">          * Should we show the blog on the front page, or the activity stream?
</span><span class="cx">          * This is set in wp-admin > Appearance > Theme Options
</span><span class="cx">          */
</span><del>-        if ( bp_is_deactivated('bp-activity.php') )
</del><ins>+        if ( !bp_is_active( 'activity' ) )
</ins><span class="cx">                 locate_template( array( 'index.php' ), true );
</span><span class="cx">         else {
</span><span class="cx">                 if ( 'blog' == bp_dtheme_show_on_frontpage() )
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultmemberssingleactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/members/single/activity.php (2538 => 2539)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/members/single/activity.php        2010-02-02 17:32:15 UTC (rev 2538)
+++ trunk/bp-themes/bp-default/members/single/activity.php        2010-02-02 17:54:12 UTC (rev 2539)
</span><span class="lines">@@ -10,14 +10,22 @@
</span><span class="cx">                                 <?php if ( 'groups' != bp_current_action() ) : ?>
</span><span class="cx">                                         <option value="new_blog_post"><?php _e( 'Show Blog Posts', 'buddypress' ) ?></option>
</span><span class="cx">                                         <option value="new_blog_comment"><?php _e( 'Show Blog Comments', 'buddypress' ) ?></option>
</span><del>-                                        <option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ) ?></option>
</del><ins>+
+                                        <?php if ( bp_is_active( 'friends' ) ) : ?>
+                                                <option value="friendship_accepted,friendship_created"><?php _e( 'Show Friendship Connections', 'buddypress' ) ?></option>
+                                        <?php endif; ?>
</ins><span class="cx">                                 <?php endif; ?>
</span><span class="cx">
</span><del>-                                <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
-                                <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
-                                <option value="created_group"><?php _e( 'Show New Groups', 'buddypress' ) ?></option>
-                                <option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option>
</del><ins>+                                <?php if ( bp_is_active( 'forums' ) ) : ?>
+                                        <option value="new_forum_topic"><?php _e( 'Show New Forum Topics', 'buddypress' ) ?></option>
+                                        <option value="new_forum_post"><?php _e( 'Show Forum Replies', 'buddypress' ) ?></option>
+                                <?php endif; ?>
</ins><span class="cx">
</span><ins>+                                <?php if ( bp_is_active( 'groups' ) ) : ?>
+                                        <option value="created_group"><?php _e( 'Show New Groups', 'buddypress' ) ?></option>
+                                        <option value="joined_group"><?php _e( 'Show New Group Memberships', 'buddypress' ) ?></option>
+                                <?php endif; ?>
+
</ins><span class="cx">                                 <?php do_action( 'bp_member_activity_filter_options' ) ?>
</span><span class="cx">                         </select>
</span><span class="cx">                 </li>
</span></span></pre>
</div>
</div>
</body>
</html>