Changeset 1296
- Timestamp:
- 04/02/2009 10:27:36 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r1295 r1296 295 295 break; 296 296 case 'new_blog_post': 297 $post = new BP_Blogs_Post( $secondary_item_id);297 $post = new BP_Blogs_Post( $item_id ); 298 298 299 299 if ( !$post ) … … 456 456 bp_blogs_update_blogmeta( $recorded_post->blog_id, 'last_activity', time() ); 457 457 458 $is_private = bp_blogs_is_blog_hidden( $recorded_post->blog_id ); 459 460 if ( $recorded_post->date_created >= strtotime( "-24 hours" ) ) { 458 if ( strtotime( $recorded_post->date_created ) >= strtotime( "-24 hours" ) ) { 461 459 // Record in activity streams, but only if the post is 30 minutes 462 460 // old or less (stops old posts registering as new posts in activity streams when a comment is posted on them) 463 bp_blogs_record_activity( array( 'item_id' => $recorded_post-> blog_id, 'secondary_item_id' => $recorded_post_id, 'component_name' => 'blogs', 'component_action' => 'new_blog_post', 'is_private' => $is_private, 'user_id' => $recorded_post->user_id ) );461 bp_blogs_record_activity( array( 'item_id' => $recorded_post->id, 'component_name' => 'blogs', 'component_action' => 'new_blog_post', 'is_private' => bp_blogs_is_blog_hidden( $recorded_post->blog_id ), 'user_id' => $recorded_post->user_id ) ); 464 462 } 465 463 } … … 485 483 486 484 $recorded_post = $existing_post; 485 486 /* Delete and re-add the activity stream item to reflect potential content changes. */ 487 if ( strtotime( $recorded_post->date_created ) >= strtotime( "-24 hours" ) ) { 488 bp_blogs_delete_activity( array( 'item_id' => $recorded_post->id, 'component_name' => 'blogs', 'component_action' => 'new_blog_post', 'user_id' => $recorded_post->user_id ) ); 489 bp_blogs_record_activity( array( 'item_id' => $recorded_post->id, 'component_name' => 'blogs', 'component_action' => 'new_blog_post', 'is_private' => bp_blogs_is_blog_hidden( $recorded_post->blog_id ), 'user_id' => $recorded_post->user_id ) ); 490 } 487 491 } 488 492
Note: See TracChangeset
for help on using the changeset viewer.