Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/16/2013 03:15:36 AM (11 years ago)
Author:
boonebgorges
Message:

Use the correct root_id when composing the activity Admin screen

Activity comments have the root_id of the root parent item, while non-comments
have their own ID as the root_id. Setting this value correctly ensures that the
correct data is sent with AJAX comment creation, which in turn ensures that
comments are associated with the correct activity item.

Fixes #5014

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-admin.php

    r7473 r7579  
    11431143        }
    11441144
    1145         echo '<tr' . $row_class . ' id="activity-' . esc_attr( $item['id'] ) . '" data-parent_id="' . esc_attr( $item['id'] ) . '" data-root_id="' . esc_attr( $item['item_id'] ) . '">';
     1145        if ( 'activity_comment' === $item['type'] ) {
     1146            $root_id = $item['item_id'];
     1147        } else {
     1148            $root_id = $item['id'];
     1149        }
     1150
     1151        echo '<tr' . $row_class . ' id="activity-' . esc_attr( $item['id'] ) . '" data-parent_id="' . esc_attr( $item['id'] ) . '" data-root_id="' . esc_attr( $root_id ) . '">';
    11461152        echo $this->single_row_columns( $item );
    11471153        echo '</tr>';
Note: See TracChangeset for help on using the changeset viewer.