Opened 10 years ago
Closed 9 years ago
#6164 closed defect (bug)
remove redundant updating of metadata in groups_create_group()
Reported by: | jreeve | Owned by: | 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.
remove redundant function call for updating group metadata about last activity