<!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] [2604] trunk:
  Fixing bug with group activity stream and limiting to only the logged in users activity
 .</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd>2604</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2010-02-05 11:03:47 +0000 (Fri, 05 Feb 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fixing bug with group activity stream and limiting to only the logged in users activity.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivitytemplatetagsphp">trunk/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#trunkbpcorebpcoretemplatetagsphp">trunk/bp-core/bp-core-templatetags.php</a></li>
<li><a href="#trunkbpthemesbpdefault_incajaxphp">trunk/bp-themes/bp-default/_inc/ajax.php</a></li>
<li><a href="#trunkbpthemesbpdefault_incglobaljs">trunk/bp-themes/bp-default/_inc/global.js</a></li>
<li><a href="#trunkbpthemesbpdefaultfunctionsphp">trunk/bp-themes/bp-default/functions.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-templatetags.php (2603 => 2604)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2010-02-05 06:20:14 UTC (rev 2603)
+++ trunk/bp-activity/bp-activity-templatetags.php        2010-02-05 11:03:47 UTC (rev 2604)
</span><span class="lines">@@ -172,7 +172,7 @@
</span><span class="cx">         extract( $r );
</span><span class="cx"> 
</span><span class="cx">         /* If you have passed a &quot;scope&quot; then this will override any filters you have passed. */
</span><del>-        if ( !empty( $scope ) &amp;&amp; 'all' != $scope ) {
</del><ins>+        if ( 'just-me' == $scope || 'friends' == $scope || 'groups' == $scope || 'favorites' == $scope || 'mentions' == $scope ) {
</ins><span class="cx">                 if ( 'just-me' == $scope )
</span><span class="cx">                         $display_comments = 'stream';
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpcorebpcoretemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-core/bp-core-templatetags.php (2603 => 2604)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-core/bp-core-templatetags.php        2010-02-05 06:20:14 UTC (rev 2603)
+++ trunk/bp-core/bp-core-templatetags.php        2010-02-05 11:03:47 UTC (rev 2604)
</span><span class="lines">@@ -1774,7 +1774,7 @@
</span><span class="cx">         function bp_get_the_body_class( $wp_classes, $custom_classes = false ) {
</span><span class="cx">                 global $bp;
</span><span class="cx"> 
</span><del>-                if ( bp_is_blog_page() &amp;&amp; is_front_page() &amp;&amp; $bp-&gt;current_component != BP_HOME_BLOG_SLUG )
</del><ins>+                if ( is_front_page() &amp;&amp; $bp-&gt;current_component != BP_HOME_BLOG_SLUG )
</ins><span class="cx">                         $bp_classes[] = 'home-page';
</span><span class="cx"> 
</span><span class="cx">                 if ( ( bp_is_blog_page() || bp_is_register_page() || bp_is_activation_page() ) &amp;&amp; !is_page() )
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incajaxphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/ajax.php (2603 => 2604)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/ajax.php        2010-02-05 06:20:14 UTC (rev 2603)
+++ trunk/bp-themes/bp-default/_inc/ajax.php        2010-02-05 11:03:47 UTC (rev 2604)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">                         $user_id = ( $bp-&gt;displayed_user-&gt;id ) ? $bp-&gt;displayed_user-&gt;id : $bp-&gt;loggedin_user-&gt;id;
</span><span class="cx">                         $qs[] = 'user_id=' . $user_id;
</span><span class="cx">                 }
</span><del>-                if ( 'all' != $_BP_COOKIE['bp-' . $object . '-scope'] &amp;&amp; empty( $bp-&gt;displayed_user-&gt;id ) )
</del><ins>+                if ( 'all' != $_BP_COOKIE['bp-' . $object . '-scope'] &amp;&amp; bp_dtheme_is_activity_directory() )
</ins><span class="cx">                         $qs[] = 'scope=' . $_BP_COOKIE['bp-' . $object . '-scope']; // Activity stream scope on activity directory.
</span><span class="cx">         }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_incglobaljs"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/global.js (2603 => 2604)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/global.js        2010-02-05 06:20:14 UTC (rev 2603)
+++ trunk/bp-themes/bp-default/_inc/global.js        2010-02-05 11:03:47 UTC (rev 2604)
</span><span class="lines">@@ -1028,11 +1028,6 @@
</span><span class="cx">                         j.cookie('bp-' + objects[i] + '-extras', null, {path: '/'} );
</span><span class="cx">                 });
</span><span class="cx">         });
</span><del>-
-        /* On page unload, clear the activity scope. */
-        j(window).unload( function() {
-                j.cookie('bp-activity-scope', null, {path: '/'});
-        });
</del><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> /* Setup activity scope and filter based on the current cookie settings. */
</span></span></pre></div>
<a id="trunkbpthemesbpdefaultfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/functions.php (2603 => 2604)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/functions.php        2010-02-05 06:20:14 UTC (rev 2603)
+++ trunk/bp-themes/bp-default/functions.php        2010-02-05 11:03:47 UTC (rev 2604)
</span><span class="lines">@@ -109,6 +109,18 @@
</span><span class="cx">         return apply_filters( 'bp_dtheme_show_on_frontpage', 'activity' );
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function bp_dtheme_is_activity_directory() {
+        global $bp;
+
+        if ( BP_ACTIVITY_SLUG == $bp-&gt;current_component &amp;&amp; empty( $bp-&gt;displayed_user-&gt;id ) &amp;&amp; !$bp-&gt;is_single_item )
+                return true;
+
+        if ( 'activity' == bp_dtheme_show_on_frontpage() &amp;&amp; is_front_page() )
+                return true;
+
+        return false;
+}
+
</ins><span class="cx"> /* Set the defaults for the custom header image (http://ryan.boren.me/2007/01/07/custom-image-header-api/) */
</span><span class="cx"> define( 'HEADER_TEXTCOLOR', 'FFFFFF' );
</span><span class="cx"> define( 'HEADER_IMAGE', '%s/_inc/images/default_header.jpg' ); // %s is theme dir uri
</span></span></pre>
</div>
</div>

</body>
</html>