Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

#4239 closed defect (bug) (fixed)

Fix filter parameters in groups_update_group_forum_post()

Reported by: r-a-y's profile r-a-y Owned by:
Milestone: 1.6 Priority: normal
Severity: normal Version:
Component: Forums Keywords: has-patch
Cc:

Description

In the groups_update_group_forum_post() function, the 'groups_activity_new_forum_post_action' and 'groups_activity_new_forum_post_content' filters were using the wrong parameters instead of those originally set in groups_new_group_forum_post().

The attached patch against r6059 makes sure these parameters are the same.

The patch also:

  • Removes global $bp references for native BP functions in bp-group-forums.php
  • Adds PHPDoc throughout bp-group-forums.php

Attachments (2)

4239.01.patch (19.5 KB) - added by r-a-y 12 years ago.
4239.02.patch (19.5 KB) - added by r-a-y 12 years ago.

Download all attachments as: .zip

Change History (9)

@r-a-y
12 years ago

#1 @DJPaul
12 years ago

  • Keywords reporter-feedback added; has-patch removed

Thanks r-a-y.

While you're right about the filter change, it could cause backpat issues. I'd prefer we replace forum_post with topic (as forum_post isn't set), and if there is a good reason for further parameters, to just add those onto the end.

#2 @boonebgorges
12 years ago

Sad to say (because I would also like it to be "right") I agree with DJPaul here. We can't just change the filter parameters without breaking some stuff.

Happy to add more params at the end, though. And I like the rest of the patch :)

@r-a-y
12 years ago

#3 @r-a-y
12 years ago

  • Keywords has-patch added; reporter-feedback removed

I can live with what DJPaul suggested :)

Repatched!

#4 @DJPaul
12 years ago

  • Milestone changed from Awaiting Review to 1.6

#5 @DJPaul
12 years ago

Looks good.

Whoever commits this: remove the duplicated "&$topic, &$topic"

#6 @r-a-y
12 years ago

The duplicated &$topic is needed because we decided that we didn't want to change any of the filter parameters except for replacing the unset $forum_post to &$topic.

The &$topic is the fourth parameter in the filters mentioned above. (Lines 113/114 and lines 274/275 of the patch.)

#7 @djpaul
12 years ago

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

(In [6064]) Removes global $bp references for native BP functions in bp-group-forums.php. Adds PHPDoc throughout bp-group-forums.php. Fixes #4239, props r-a-y

Note: See TracTickets for help on using tickets.