Skip to:

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3505 closed defect (bug) (fixed)

Audit usage of bp_create_excerpt()

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: 1.5 Priority: normal
Severity: minor Version: 1.5
Component: Core Keywords: has-patch


There are a couple of instances where the updated version of bp_create_excerpt() hasn't been updated in other parts of BP.

The attached patch alters:

  • bp_get_group_description_excerpt() - Removed $length argument so it uses the default one in bp_create_excerpt()
  • bp_get_member_latest_update() - Removed $length argument so it uses the default one in bp_create_excerpt(); made some changes to how the "View" link is rendered (similar to how bp_activity_truncate_entry() does it)
  • bp_get_the_topic_latest_post_excerpt() - Removed arguments altogether. I don't believe this function is even being used at the moment so this should be relatively safe.


There are some other instances, but those are the main offenders.

Attachments (3)

3505.01.patch (4.8 KB) - added by r-a-y 13 years ago.
3505.02.patch (4.8 KB) - added by r-a-y 13 years ago.
3505.03.patch (4.6 KB) - added by boonebgorges 13 years ago.

Download all attachments as: .zip

Change History (9)

13 years ago

#1 @r-a-y
13 years ago

  • Component changed from Groups to Core

13 years ago

#2 @boonebgorges
13 years ago

Thanks for the patch, r-a-y. Good catch on the length issues.

I would rather not remove arguments where they once existed, if there is no pressing reason to do so. At the very least, if we are going to remove them, they should be properly deprecated.

3505.03.patch adapts .02.patch by reintroducing the arguments you removed. If you've got a reason for deprecating the arguments instead (aside from "we don't use them internally"), speak now or forever hold your peace :)

#3 @boonebgorges
13 years ago

  • Milestone changed from Awaiting Review to 1.5

#4 @r-a-y
13 years ago

I'll speak now and say that I was being a little bit harsh ;)
Keep on truckin'!

#5 @r-a-y
13 years ago

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

See r5030.

#6 @boonebgorges
13 years ago

Whoops, slip of the finger at commit time.

Note: See TracTickets for help on using tickets.