Changeset 8226
- Timestamp:
- 04/01/2014 12:28:34 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-classes.php
r8201 r8226 1014 1014 while ( $parent_id !== $r->item_id ) { 1015 1015 $depth++; 1016 $parent_id = $ref[ $parent_id ]->secondary_item_id; 1016 1017 // When display_comments=stream, the 1018 // parent comment may not be part of 1019 // the returned results, so we manually 1020 // fetch it 1021 if ( empty( $ref[ $parent_id ] ) ) { 1022 $direct_parent = new BP_Activity_Activity( $parent_id ); 1023 if ( isset( $direct_parent->secondary_item_id ) ) { 1024 $parent_id = $direct_parent->secondary_item_id; 1025 } else { 1026 // Something went wrong 1027 // Short-circuit the 1028 // depth calculation 1029 $parent_id = $r->item_id; 1030 } 1031 } else { 1032 $parent_id = $ref[ $parent_id ]->secondary_item_id; 1033 } 1017 1034 } 1018 1035 $r->depth = $depth;
Note: See TracChangeset
for help on using the changeset viewer.