Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/14/2015 04:37:30 PM (9 years ago)
Author:
r-a-y
Message:

Blogs: Record activity item for blog post if it doesn't exist when a post comment is posted.

Fixes an issue where if "Allow activity stream commenting on blog and forum
posts" is enabled, the activity item for the post comment would not be
created because the activity item for the blog post does not exist.

This might occur if the "Site Tracking" component is enabled after posts
have already been published.

Commit also includes a unit test.

Fixes #6530.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-functions.php

    r10248 r10277  
    674674            ) );
    675675
     676            // Try to create a new activity item for the parent blog post
     677            if ( empty( $parent_activity_id ) ) {
     678                $parent_activity_id = bp_activity_post_type_publish( $recorded_comment->comment_post_ID, $recorded_comment->post );
     679            }
     680
    676681            // we found the parent activity entry
    677682            // so let's go ahead and reconfigure some activity args
Note: See TracChangeset for help on using the changeset viewer.