<!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] [2474] trunk:
  Fixing component dependencies within the default theme.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2474</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-01-29 13:44:11 +0000 (Fri, 29 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixing component dependencies within the default theme.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpcorebpcorecatchuriphp">trunk/bp-core/bp-core-catchuri.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="#trunkbpthemesbpdefaultactivitypostformphp">trunk/bp-themes/bp-default/activity/post-form.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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpcorebpcorecatchuriphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-catchuri.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-catchuri.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-core/bp-core-catchuri.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><span class="cx">         if ( !function_exists('xprofile_install') )
</span><del>-                bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'profile/index' ) );
</del><ins>+                bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'members/single/home' ) );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ?&gt;
</span><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-templatetags.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-templatetags.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-core/bp-core-templatetags.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -1388,6 +1388,15 @@
</span><span class="cx"> 
</span><span class="cx"> /* Template is_() functions to determine the current page */
</span><span class="cx"> 
</span><ins>+function bp_is_deactivated( $plugin_file ) {
+        global $bp_deactivated;
+
+        if ( isset( $bp_deactivated[$plugin_file] ) )
+                return true;
+
+        return false;
+}
+
</ins><span class="cx"> function bp_is_profile_component() {
</span><span class="cx">         global $bp;
</span><span class="cx"> 
</span><span class="lines">@@ -1490,7 +1499,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 )
</del><ins>+        if ( BP_XPROFILE_SLUG == $bp-&gt;current_component || $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></pre></div>
<a id="trunkbpthemesbpdefault_incoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/options.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/options.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/_inc/options.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -34,7 +34,9 @@
</span><span class="cx">                                                         &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'On front page show:', 'buddypress' ) ?&gt;&lt;/th&gt;
</span><span class="cx">                                                         &lt;td&gt;
</span><span class="cx">                                                                 &lt;label&gt;&lt;input id=&quot;bpdtheme_frontpage_blog&quot; type=&quot;radio&quot; name=&quot;show_on_frontpage&quot; &lt;?php if ( $bp_dtheme_options['show_on_frontpage'] == 'blog' || empty($bp_dtheme_options['show_on_frontpage']) ) echo 'checked=&quot;checked&quot;'; ?&gt; value=&quot;blog&quot; /&gt; &lt;?php _e( 'Blog Posts', 'buddypress' ) ?&gt;&lt;/label&gt;&lt;br /&gt;
</span><del>-                                                                &lt;label&gt;&lt;input id=&quot;bpdtheme_frontpage_activity&quot; type=&quot;radio&quot; name=&quot;show_on_frontpage&quot; &lt;?php if ( $bp_dtheme_options['show_on_frontpage'] == 'activity' ) echo 'checked=&quot;checked&quot;'; ?&gt; value=&quot;activity&quot; /&gt; &lt;?php _e( 'Activity Stream', 'buddypress' ) ?&gt;&lt;/label&gt;
</del><ins>+                                                                &lt;?php if ( !bp_is_deactivated('bp-activity.php') ) : ?&gt;
+                                                                        &lt;label&gt;&lt;input id=&quot;bpdtheme_frontpage_activity&quot; type=&quot;radio&quot; name=&quot;show_on_frontpage&quot; &lt;?php if ( $bp_dtheme_options['show_on_frontpage'] == 'activity' ) echo 'checked=&quot;checked&quot;'; ?&gt; value=&quot;activity&quot; /&gt; &lt;?php _e( 'Activity Stream', 'buddypress' ) ?&gt;&lt;/label&gt;
+                                                                &lt;?php endif; ?&gt;
</ins><span class="cx">                                                         &lt;/td&gt;
</span><span class="cx">                                                 &lt;/tr&gt;
</span><span class="cx">                                         &lt;/tbody&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivityindexphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/index.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/index.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/activity/index.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -21,12 +21,16 @@
</span><span class="cx"> 
</span><span class="cx">                                         &lt;?php if ( is_user_logged_in() ) : ?&gt;
</span><span class="cx"> 
</span><del>-                                                &lt;?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?&gt;
-                                                        &lt;li id=&quot;activity-friends&quot;&gt;&lt;a href=&quot;&lt;?php echo site_url( BP_ACTIVITY_SLUG . '/#friends/' ) ?&gt;&quot; title=&quot;&lt;?php _e( 'The activity of my friends only.', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
</del><ins>+                                                &lt;?php if ( function_exists( 'bp_get_total_friend_count' ) ) : ?&gt;
+                                                        &lt;?php if ( bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?&gt;
+                                                                &lt;li id=&quot;activity-friends&quot;&gt;&lt;a href=&quot;&lt;?php echo site_url( BP_ACTIVITY_SLUG . '/#friends/' ) ?&gt;&quot; title=&quot;&lt;?php _e( 'The activity of my friends only.', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'My Friends (%s)', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
+                                                        &lt;?php endif; ?&gt;
</ins><span class="cx">                                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><del>-                                                &lt;?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?&gt;
-                                                        &lt;li id=&quot;activity-groups&quot;&gt;&lt;a href=&quot;&lt;?php echo site_url( BP_ACTIVITY_SLUG . '/#groups/' ) ?&gt;&quot; title=&quot;&lt;?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
</del><ins>+                                                &lt;?php if ( function_exists( 'bp_get_total_group_count_for_user' ) ) : ?&gt;
+                                                        &lt;?php if ( bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) : ?&gt;
+                                                                &lt;li id=&quot;activity-groups&quot;&gt;&lt;a href=&quot;&lt;?php echo site_url( BP_ACTIVITY_SLUG . '/#groups/' ) ?&gt;&quot; title=&quot;&lt;?php _e( 'The activity of groups I am a member of.', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php printf( __( 'My Groups (%s)', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ) ?&gt;&lt;/a&gt;&lt;/li&gt;
+                                                        &lt;?php endif; ?&gt;
</ins><span class="cx">                                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                                 &lt;?php if ( bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ) : ?&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultactivitypostformphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/activity/post-form.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/activity/post-form.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/activity/post-form.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx">                                 &lt;input type=&quot;submit&quot; name=&quot;aw-whats-new-submit&quot; id=&quot;aw-whats-new-submit&quot; value=&quot;&lt;?php _e( 'Post Update', 'buddypress' ) ?&gt;&quot; /&gt;
</span><span class="cx">                         &lt;/div&gt;
</span><span class="cx"> 
</span><del>-                        &lt;?php if ( !bp_is_my_profile() &amp;&amp; !bp_is_group() ) : ?&gt;
</del><ins>+                        &lt;?php if ( function_exists('bp_has_groups') &amp;&amp; !bp_is_my_profile() &amp;&amp; !bp_is_group() ) : ?&gt;
</ins><span class="cx">                                 &lt;div id=&quot;whats-new-post-in-box&quot;&gt;
</span><span class="cx">                                         &lt;?php _e( 'Post in', 'buddypress' ) ?&gt;:
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/header.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/header.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/header.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -48,14 +48,16 @@
</span><span class="cx">                                         &lt;a href=&quot;&lt;?php echo site_url() ?&gt;&quot; title=&quot;&lt;?php _e( 'Home', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Home', 'buddypress' ) ?&gt;&lt;/a&gt;
</span><span class="cx">                                 &lt;/li&gt;
</span><span class="cx"> 
</span><del>-                                &lt;?php if ( 'blog' == bp_dtheme_show_on_frontpage() ) : ?&gt;
-                                        &lt;li&lt;?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt;&gt;
-                                                &lt;a href=&quot;&lt;?php echo site_url() ?&gt;/&lt;?php echo BP_ACTIVITY_SLUG ?&gt;/&quot; title=&quot;&lt;?php _e( 'Activity', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Activity', 'buddypress' ) ?&gt;&lt;/a&gt;
-                                        &lt;/li&gt;
-                                &lt;?php else : ?&gt;
-                                        &lt;li&lt;?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) || bp_is_blog_page() &amp;&amp; !is_front_page() &amp;&amp; !is_page() ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt;&gt;
-                                                &lt;a href=&quot;&lt;?php echo site_url() ?&gt;/&lt;?php echo BP_HOME_BLOG_SLUG ?&gt;/&quot; title=&quot;&lt;?php _e( 'Blog', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Blog', 'buddypress' ) ?&gt;&lt;/a&gt;
-                                        &lt;/li&gt;
</del><ins>+                                &lt;?php if ( !bp_is_deactivated('bp-activity.php') ) : ?&gt;
+                                        &lt;?php if ( 'blog' == bp_dtheme_show_on_frontpage() ) : ?&gt;
+                                                &lt;li&lt;?php if ( bp_is_page( BP_ACTIVITY_SLUG ) ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt;&gt;
+                                                        &lt;a href=&quot;&lt;?php echo site_url() ?&gt;/&lt;?php echo BP_ACTIVITY_SLUG ?&gt;/&quot; title=&quot;&lt;?php _e( 'Activity', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Activity', 'buddypress' ) ?&gt;&lt;/a&gt;
+                                                &lt;/li&gt;
+                                        &lt;?php else : ?&gt;
+                                                &lt;li&lt;?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) || bp_is_blog_page() &amp;&amp; !is_front_page() &amp;&amp; !is_page() ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt;&gt;
+                                                        &lt;a href=&quot;&lt;?php echo site_url() ?&gt;/&lt;?php echo BP_HOME_BLOG_SLUG ?&gt;/&quot; title=&quot;&lt;?php _e( 'Blog', 'buddypress' ) ?&gt;&quot;&gt;&lt;?php _e( 'Blog', 'buddypress' ) ?&gt;&lt;/a&gt;
+                                                &lt;/li&gt;
+                                        &lt;?php endif; ?&gt;
</ins><span class="cx">                                 &lt;?php endif; ?&gt;
</span><span class="cx"> 
</span><span class="cx">                                 &lt;li&lt;?php if (  bp_is_page( BP_MEMBERS_SLUG ) || bp_is_member() ) : ?&gt; class=&quot;selected&quot;&lt;?php endif; ?&gt;&gt;
</span></span></pre></div>
<a id="trunkbpthemesbpdefaulthomephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/home.php (2473 => 2474)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/home.php        2010-01-29 10:43:01 UTC (rev 2473)
+++ trunk/bp-themes/bp-default/home.php        2010-01-29 13:44:11 UTC (rev 2474)
</span><span class="lines">@@ -3,9 +3,12 @@
</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 &gt; Appearance &gt; Theme Options
</span><span class="cx">          */
</span><del>-
-        if ( 'blog' == bp_dtheme_show_on_frontpage() )
</del><ins>+        if ( bp_is_deactivated('bp-activity.php') )
</ins><span class="cx">                 locate_template( array( 'index.php' ), true );
</span><del>-        else
-                locate_template( array( 'activity/index.php' ), true );
</del><ins>+        else {
+                if ( 'blog' == bp_dtheme_show_on_frontpage() )
+                        locate_template( array( 'index.php' ), true );
+                else
+                        locate_template( array( 'activity/index.php' ), true );
+        }
</ins><span class="cx"> ?&gt;
</span><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>