Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/06/2017 07:36:10 PM (3 years ago)
Author:
r-a-y
Message:

Activity Admin: Ensure activity comment depth check is respected.

For blog activity comment replies, we need to change the operator to
"greater or equal to" for the depth check to be accurate, due to activity
items being displayed in stream mode.

For regular activity comment replies, we need to add our activity comment
reply check to BP_Activity_List_Table::can_comment(). This can be
further optimized by moving this out of the Blogs component check in a
later release.

See #7329.

File:
1 edited

Legend:

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

    r11268 r11414  
    13011301    // Check comment depth and disable if depth is too large.
    13021302    if ( isset( buddypress()->blogs->thread_depth[$comment->item_id] ) ){
    1303         if ( bp_activity_get_comment_depth() > buddypress()->blogs->thread_depth[$comment->item_id] ) {
     1303        if ( bp_activity_get_comment_depth( $comment ) >= buddypress()->blogs->thread_depth[$comment->item_id] ) {
    13041304            $retval = false;
    13051305        }
Note: See TracChangeset for help on using the changeset viewer.