Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 9 years ago

#6164 closed defect (bug)

remove redundant updating of metadata in groups_create_group()

Reported by: jreeve's profile jreeve Owned by: r-a-y's profile r-a-y
Milestone: Priority: normal
Severity: normal Version:
Component: Groups Keywords: has-patch
Cc: jon.reeve@…

Description

While working on #6158, I noticed that groups_create_group() in bp-groups/bp-groups-functions.php was calling groups_update_groupmeta():

groups_update_groupmeta( $group->id, 'last_activity', bp_core_current_time() );

but this was already being handled the right way by hooking groups_update_last_activity() into the action groups_created_group in bp-groups/bp-groups-activity.php:

add_action( 'groups_created_group', 'groups_update_last_activity' );.

Unless I'm mistaken (it's possible there's something about this I'm missing), this is redundant. The attached patch simply removes this redundant function call.

Attachments (1)

6164.patch (476 bytes) - added by jreeve 10 years ago.
remove redundant function call for updating group metadata about last activity

Download all attachments as: .zip

Change History (4)

@jreeve
10 years ago

remove redundant function call for updating group metadata about last activity

#1 @jreeve
10 years ago

  • Cc jon.reeve@… added
  • Component changed from Core to Groups

#2 @r-a-y
10 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 2.3
  • Owner set to r-a-y
  • Status changed from new to assigned

#3 @r-a-y
9 years ago

  • Milestone 2.3 deleted
  • Status changed from assigned to closed

Going to close this as a duplicate of #6158 as the updated patch in 6158 merges both fixes.

Thanks jreeve!

Note: See TracTickets for help on using tickets.