Skip to:
Content

BuddyPress.org

Ticket #6494: 6494.02.patch

File 6494.02.patch, 998 bytes (added by imath, 10 years ago)
  • src/bp-blogs/bp-blogs-activity.php

    diff --git src/bp-blogs/bp-blogs-activity.php src/bp-blogs/bp-blogs-activity.php
    index ca889a7..a006d05 100644
    function bp_blogs_sync_add_from_activity_comment( $comment_id, $params, $parent_ 
    605605        //       doesn't change on the frontend until the next page refresh.
    606606        $resave_activity = new BP_Activity_Activity( $comment_id );
    607607        $resave_activity->primary_link = get_comment_link( $post_comment_id );
     608
     609        /**
     610         * Now that the activity id exists and the post comment was created, we don't need to update
     611         * the content of the comment as there are no chances it has evolved.
     612         */
     613        remove_action( 'bp_activity_before_save', 'bp_blogs_sync_activity_edit_to_post_comment', 20 );
     614
    608615        $resave_activity->save();
    609616
     617        // add the edit activity comment hook back
     618        add_action( 'bp_activity_before_save', 'bp_blogs_sync_activity_edit_to_post_comment', 20 );
     619
    610620        // multisite again!
    611621        restore_current_blog();
    612622