Skip to:

Opened 9 years ago

Closed 9 years ago

#4892 closed defect (bug) (fixed)

bp_activity_latest_update_content filter is present but not utilised when saving activity content in usermeta

Reported by: saurabhshukla Owned by: saurabhshukla
Milestone: 1.8 Priority: low
Severity: minor Version: 1.6
Component: Activity Keywords: has-patch early commit


'bp_activity_latest_update_content' filters content. But after filtering, the original unfiltered content is added in the database. Just adding it appropriately will let developers filter it for other types of content.

Attachments (3)

bp-activity-functions.diff (721 bytes) - added by saurabhshukla 9 years ago.
Fixes latest update filtering
4892.02.patch (1.4 KB) - added by DJPaul 9 years ago.
bp-activity-functions.2.diff (834 bytes) - added by saurabhshukla 9 years ago.

Download all attachments as: .zip

Change History (12)

9 years ago

Fixes latest update filtering

#1 @saurabhshukla
9 years ago

  • Owner set to saurabhshukla
  • Status changed from new to accepted

9 years ago

#2 @DJPaul
9 years ago

  • Keywords reporter-feedback added

Good spot. All the filters for content here look a bit funky; 4892.02.patch makes it better, but it does move bp_activity_latest_update_content before bp_activity_new_update_content

#3 @DJPaul
9 years ago

  • Component changed from Core to Activity
  • Severity changed from major to normal

#4 @johnjamesjacoby
9 years ago

  • Keywords commit added

Patch here looks good to me. Feel free to 1.7 it if you'd like.

#5 @saurabhshukla
9 years ago

I feel, the two should be kept separate. The latest update might need different handling than the actual activity that shows up in the activity stream.

So, the array that goes into bp_activity_add can remain as it is. That is handled separately and nicely. Let this be distinct.

#6 @saurabhshukla
9 years ago

  • Keywords reporter-feedback removed

#7 @johnjamesjacoby
9 years ago

  • Keywords early added
  • Milestone changed from Awaiting Review to 1.8
  • Priority changed from normal to low
  • Severity changed from normal to minor
  • Version changed from 1.7 to 1.6

Not a regression, so moving to 1.8. This function is weird in general, so let's address it early in 1.8.

#8 @boonebgorges
9 years ago

I agree with saurabhshukla that there's no real reason to collapse these two filters into one. I did add the modified $activity_content to the bp_activity_latest_update_content filter, so that you can use the previously filtered content if you want.

#9 @boonebgorges
9 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 7115:

Use filtered content when storing latest update in usermeta

Previously, the content was run through the
bp_activity_latest_update_content filter, but was then unused.

Fixes #4892

Props saurabhshukla

Note: See TracTickets for help on using tickets.