Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/06/2014 01:40:03 AM (11 years ago)
Author:
r-a-y
Message:

Groups: When fetching a new group object, default 'populate_extras' to false.

In r7934, the 'populate_extras' parameter was set to true. This
parameter queries additional info about the group including group
admins, moderators and member status.

There are very few instances where we need this extra information. We
only need this data when on a single group or in a group loop.

Therefore, this commit sets the 'populate_extras' parameter to false
by default and sets it to true when setting up the current group
object.

Fixes #5411

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/testcases/groups/functions.php

    r7956 r8056  
    563563        $this->set_current_user( $u1 );
    564564
    565         $group1 = groups_get_group( array( 'group_id' => $g, ) );
     565        $group1 = groups_get_group( array( 'group_id' => $g, 'populate_extras' => true ) );
    566566
    567567        $this->set_current_user( $u2 );
    568568
    569         $group2 = groups_get_group( array( 'group_id' => $g, ) );
     569        $group2 = groups_get_group( array( 'group_id' => $g, 'populate_extras' => true ) );
    570570
    571571        $this->assertNotEquals( $group1, $group2 );
Note: See TracChangeset for help on using the changeset viewer.