Skip to:
Content

BuddyPress.org

Ticket #6494: 6494.patch

File 6494.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 c29e56b..36bcc73 100644
    function bp_blogs_sync_add_from_activity_comment( $comment_id, $params, $parent_ 
    597597        //       doesn't change on the frontend until the next page refresh.
    598598        $resave_activity = new BP_Activity_Activity( $comment_id );
    599599        $resave_activity->primary_link = get_comment_link( $post_comment_id );
     600
     601        /**
     602         * Now that the activity id exists and the post comment was created, we don't need to update
     603         * the content of the comment as there are no chances it has evolved.
     604         */
     605        remove_action( 'bp_activity_before_save', 'bp_blogs_sync_activity_edit_to_post_comment', 20 );
     606
    600607        $resave_activity->save();
    601608
     609        // add the edit activity comment hook back
     610        add_action( 'bp_activity_before_save', 'bp_blogs_sync_activity_edit_to_post_comment', 20 );
     611
    602612        // multisite again!
    603613        restore_current_blog();
    604614