Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

#784 closed enhancement (fixed)

do_action friends_friendship_rejected - argument is useless

Reported by: DJPaul Owned by:
Milestone: 1.1 Priority: minor
Severity: Version:
Component: Keywords:
Cc: djpaul@…

Description

bp-friends.php - friends_reject_friendship()

The argument passed in the do_action( 'friends_friendship_rejected', ...) is useless. The table entry for $friendship_id is deleted in the BP_Friends_Friendship::reject call, so you can't do anything with it.

Suggest moving the do_action out of the IF, or passing the ID of the user who *sent* the friendship request.

Change History (7)

#1 @DJPaul
12 years ago

  • Cc djpaul@… added

#2 @(none)
12 years ago

  • Milestone Friends 1.1 deleted

Milestone Friends 1.1 deleted

#3 @apeatling
12 years ago

  • Milestone set to 1.1

#4 @apeatling
12 years ago

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

Not totally true, since plugins may use that friendship ID stored in some other table or in usermeta. When the friendship is removed this no longer references anything as you say, but it may still be used to delete other entries based on friendship_id by plugins.

#5 @DJPaul
12 years ago

  • Type changed from defect to enhancement

Ok yes, but it doesn't let me perform an action based on who the user *was*.

#6 @DJPaul
12 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#7 @apeatling
12 years ago

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

(In [1793]) Fixes #784 props djpaul

Note: See TracTickets for help on using tickets.