Opened 11 years ago
Closed 11 years ago
#6164 closed defect (bug)
remove redundant updating of metadata in groups_create_group()
| Reported by: | jreeve | Owned by: | r-a-y |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Groups | Version: | |
| Severity: | normal | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
remove redundant function call for updating group metadata about last activity