Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/06/2013 11:24:38 PM (11 years ago)
Author:
boonebgorges
Message:

Set initial group metadata in groups_create_group() rather than action function

Groups created through the user interface have two pieces of metadata set in
groups_action_create_group(): the total_member_count and the last_activity.
(Both items are needed for newly created groups to show up in directories.)
However, the placement of these groups_update_groupmeta() calls - in what is
essentially a controller function - meant that groups created programatically
using groups_create_group() did not have their complete metadata set. Moving
the metadata setting into groups_create_group() means one less step for plugins
and other scripts that create groups programatically.

Fixes #4827

Props ericlewis, rogercoathup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-actions.php

    r6389 r7172  
    8080                bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/' );
    8181            }
    82 
    83             groups_update_groupmeta( $bp->groups->new_group_id, 'total_member_count', 1 );
    84             groups_update_groupmeta( $bp->groups->new_group_id, 'last_activity', bp_core_current_time() );
    8582        }
    8683
Note: See TracChangeset for help on using the changeset viewer.