Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/13/2016 05:35:42 AM (3 years ago)
Author:
boonebgorges
Message:

Groups: Remove 'populate_extras' flag from BP_Groups_Group.

populate_extras was originally designed to reduce the number of
additional queries performed when setting up a group, by making those
queries optional in cases where the additional data was not needed.
Now, all of these properties are adequately cached, and lazy-loaded
so that they're only fetched when requested.

See #5451.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-component.php

    r11080 r11089  
    252252            } else {
    253253                $this->current_group->is_visible = false;
    254             }
    255 
    256             // If this is a private or hidden group, does the user have access?
    257             if ( 'private' == $this->current_group->status || 'hidden' == $this->current_group->status ) {
    258                 if ( $this->current_group->is_user_member && is_user_logged_in() || bp_current_user_can( 'bp_moderate' ) ) {
    259                     $this->current_group->user_has_access = true;
    260                 } else {
    261                     $this->current_group->user_has_access = false;
    262                 }
    263             } else {
    264                 $this->current_group->user_has_access = true;
    265254            }
    266255
Note: See TracChangeset for help on using the changeset viewer.