<!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] [1790] trunk: Fixes #949</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>1790</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-09-04 18:49:12 +0000 (Fri, 04 Sep 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fixes #949</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpblogsphp">trunk/bp-blogs.php</a></li>
<li><a href="#trunkbpforumsbpforumstemplatetagsphp">trunk/bp-forums/bp-forums-templatetags.php</a></li>
<li><a href="#trunkbpgroupsphp">trunk/bp-groups.php</a></li>
<li><a href="#trunkbpstatusbpstatustemplatetagsphp">trunk/bp-status/bp-status-templatetags.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpblogsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-blogs.php (1789 => 1790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-blogs.php        2009-09-04 18:30:04 UTC (rev 1789)
+++ trunk/bp-blogs.php        2009-09-04 18:49:12 UTC (rev 1790)
</span><span class="lines">@@ -301,10 +301,10 @@
</span><span class="cx">
</span><span class="cx"> function bp_blogs_record_blog( $blog_id, $user_id ) {
</span><span class="cx">         global $bp;
</span><del>-
</del><ins>+        
</ins><span class="cx">         if ( !$user_id )
</span><span class="cx">                 $user_id = $bp->loggedin_user->id;
</span><del>-                
</del><ins>+        
</ins><span class="cx">         $name = get_blog_option( $blog_id, 'blogname' );
</span><span class="cx">         $description = get_blog_option( $blog_id, 'blogdescription' );
</span><span class="cx">         
</span><span class="lines">@@ -317,12 +317,12 @@
</span><span class="cx">         bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'name', $name );
</span><span class="cx">         bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'description', $description );
</span><span class="cx">         bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', time() );
</span><del>-
</del><ins>+        
</ins><span class="cx">         if ( (int)$_POST['blog_public'] )
</span><span class="cx">                 $is_private = 0;
</span><span class="cx">         else
</span><span class="cx">                 $is_private = 1;
</span><del>-
</del><ins>+        
</ins><span class="cx">         /* Record this in activity streams */
</span><span class="cx">         bp_blogs_record_activity( array(
</span><span class="cx">                 'user_id' => $recorded_blog->user_id,
</span><span class="lines">@@ -331,14 +331,14 @@
</span><span class="cx">                 'component_action' => 'new_blog',
</span><span class="cx">                 'item_id' => $recorded_blog_id
</span><span class="cx">         ) );
</span><del>-
</del><ins>+        
</ins><span class="cx">         do_action( 'bp_blogs_new_blog', $recorded_blog, $is_private, $is_recorded );
</span><span class="cx"> }
</span><span class="cx"> add_action( 'wpmu_new_blog', 'bp_blogs_record_blog', 10, 2 );
</span><span class="cx">
</span><span class="cx"> function bp_blogs_record_post( $post_id, $blog_id = false, $user_id = false ) {
</span><span class="cx">         global $bp, $wpdb;
</span><del>-
</del><ins>+        
</ins><span class="cx">         $post_id = (int)$post_id;
</span><span class="cx">         $post = get_post($post_id);
</span><span class="cx">         
</span><span class="lines">@@ -347,11 +347,11 @@
</span><span class="cx">                 
</span><span class="cx">         if ( !$blog_id )
</span><span class="cx">                 $blog_id = (int)$wpdb->blogid;
</span><del>-
</del><ins>+        
</ins><span class="cx">         /* This is to stop infinate loops with Donncha's sitewide tags plugin */
</span><span class="cx">         if ( (int)get_site_option('tags_blog_id') == (int)$blog_id )
</span><span class="cx">                 return false;
</span><del>-                
</del><ins>+        
</ins><span class="cx">         /* Don't record this if it's not a post */
</span><span class="cx">         if ( $post->post_type != 'post' )
</span><span class="cx">                 return false;
</span><span class="lines">@@ -363,7 +363,7 @@
</span><span class="cx">                         $recorded_post->user_id = $user_id;
</span><span class="cx">                         $recorded_post->blog_id = $blog_id;
</span><span class="cx">                         $recorded_post->post_id = $post_id;
</span><del>-                        $recorded_post->date_created = strtotime( $post->post_date );
</del><ins>+                        $recorded_post->date_created = strtotime( $post->post_date_gmt );
</ins><span class="cx">                         
</span><span class="cx">                         $recorded_post_id = $recorded_post->save();
</span><span class="cx">                         
</span><span class="lines">@@ -442,7 +442,7 @@
</span><span class="cx">         $recorded_comment->blog_id = $wpdb->blogid;
</span><span class="cx">         $recorded_comment->comment_id = $comment_id;
</span><span class="cx">         $recorded_comment->comment_post_id = $comment->comment_post_ID;
</span><del>-        $recorded_comment->date_created = strtotime( $comment->comment_date );
</del><ins>+        $recorded_comment->date_created = strtotime( $comment->comment_date_gmt );
</ins><span class="cx">
</span><span class="cx">         $recorded_commment_id = $recorded_comment->save();
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkbpforumsbpforumstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-forums/bp-forums-templatetags.php (1789 => 1790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-forums/bp-forums-templatetags.php        2009-09-04 18:30:04 UTC (rev 1789)
+++ trunk/bp-forums/bp-forums-templatetags.php        2009-09-04 18:49:12 UTC (rev 1790)
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx">         function bp_get_the_topic_time_since_created() {
</span><span class="cx">                 global $forum_template;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_the_topic_time_since_created', bp_core_time_since( bb_gmtstrtotime( $forum_template->topic->topic_start_time ) ) );
</del><ins>+                return apply_filters( 'bp_get_the_topic_time_since_created', bp_core_time_since( strtotime( $forum_template->topic->topic_start_time ) ) );
</ins><span class="cx">         }
</span><span class="cx">         
</span><span class="cx"> function bp_the_topic_latest_post_excerpt( $args = '' ) {
</span><span class="lines">@@ -386,7 +386,7 @@
</span><span class="cx">         function bp_get_the_topic_time_since_last_post() {
</span><span class="cx">                 global $forum_template;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_the_topic_time_since_last_post', bp_core_time_since( bb_gmtstrtotime( $forum_template->topic->topic_time ) ) );
</del><ins>+                return apply_filters( 'bp_get_the_topic_time_since_last_post', bp_core_time_since( strtotime( $forum_template->topic->topic_time ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_admin_links( $args = '' ) {
</span><span class="lines">@@ -669,7 +669,7 @@
</span><span class="cx">         function bp_get_the_topic_post_time_since() {
</span><span class="cx">                 global $topic_template;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_the_topic_post_time_since', bp_core_time_since( bb_gmtstrtotime( $topic_template->post->post_time ) ) );
</del><ins>+                return apply_filters( 'bp_get_the_topic_post_time_since', bp_core_time_since( strtotime( $topic_template->post->post_time ) ) );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_the_topic_post_is_mine() {
</span></span></pre></div>
<a id="trunkbpgroupsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups.php (1789 => 1790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups.php        2009-09-04 18:30:04 UTC (rev 1789)
+++ trunk/bp-groups.php        2009-09-04 18:49:12 UTC (rev 1790)
</span><span class="lines">@@ -489,7 +489,7 @@
</span><span class="cx">                         
</span><span class="cx">                         /* Once we compelete all steps, record the group creation in the activity stream. */
</span><span class="cx">                         groups_record_activity( array(
</span><del>-                                'content' => sprintf( __( '%s created the group %s:', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ),
</del><ins>+                                'content' => sprintf( __( '%s created the group %s', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ),
</ins><span class="cx">                                 'primary_link' => bp_get_group_permalink( $bp->groups->current_group ),
</span><span class="cx">                                 'component_action' => 'created_group',
</span><span class="cx">                                 'item_id' => $bp->groups->new_group_id
</span><span class="lines">@@ -2103,7 +2103,7 @@
</span><span class="cx">                         'item_id' => (int)$bp->groups->current_group->id,
</span><span class="cx">                         'user_id' => (int)$topic->topic_poster,
</span><span class="cx">                         'secondary_item_id' => $topic->topic_id,
</span><del>-                        'recorded_time' => bb_gmtstrtotime( $topic->topic_time )
</del><ins>+                        'recorded_time' => strtotime( $topic->topic_time )
</ins><span class="cx">                 ) );
</span><span class="cx">
</span><span class="cx">                 do_action( 'groups_update_group_forum_topic', &$topic );
</span><span class="lines">@@ -2153,7 +2153,7 @@
</span><span class="cx">                         'component_action' => 'new_forum_post',
</span><span class="cx">                         'item_id' => $bp->groups->current_group->id,
</span><span class="cx">                         'secondary_item_id' => $post_id,
</span><del>-                        'recorded_time' => bb_gmtstrtotime( $post->post_time )
</del><ins>+                        'recorded_time' => strtotime( $post->post_time )
</ins><span class="cx">                 ) );
</span><span class="cx">
</span><span class="cx">                 do_action( 'groups_update_group_forum_post', &$post, &$topic );
</span></span></pre></div>
<a id="trunkbpstatusbpstatustemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-status/bp-status-templatetags.php (1789 => 1790)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-status/bp-status-templatetags.php        2009-09-04 18:30:04 UTC (rev 1789)
+++ trunk/bp-status/bp-status-templatetags.php        2009-09-04 18:49:12 UTC (rev 1790)
</span><span class="lines">@@ -102,4 +102,11 @@
</span><span class="cx">         echo apply_filters( 'bp_status_form_action', bp_core_get_user_domain( $user_id ) . BP_STATUS_SLUG . '/add' );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function bp_the_status_css_class() {
+        echo bp_get_the_status_css_class();
+}
+        function bp_get_the_status_css_class() {
+                return ( bp_loggedin_user_id() == bp_displayed_user_id() ) ? 'status-editable' : 'status-display';
+        }
+
</ins><span class="cx"> ?>
</span><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>
</body>
</html>