Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/15/2010 11:59:40 AM (14 years ago)
Author:
apeatling
Message:

Merging 1.2 branch with trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r2920 r2925  
    2727        if ( isset( $_REQUEST['letter'] ) && '' != $_REQUEST['letter'] ) {
    2828            $this->members = BP_Core_User::get_users_by_letter( $_REQUEST['letter'], $this->pag_num, $this->pag_page, $populate_extras );
    29         }
    30         else if ( false !== $include ) {
    31             $this->members = BP_Core_User::get_specific_users( $include, $this->pag_num, $this->pag_page, $populate_extras );
    32         }
    33         else {
    34             $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras ) );
     29        } else {
     30            $this->members = bp_core_get_users( array( 'type' => $this->type, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'user_id' => $user_id, 'include' => $include, 'search_terms' => $search_terms, 'populate_extras' => $populate_extras ) );
    3531        }
    3632
     
    159155    }
    160156
     157    /* Make sure we return no members if we looking at friendship requests and there are none. */
     158    if ( empty( $include ) && $bp->friends->slug == $bp->current_component && 'requests' == $bp->current_action )
     159        return false;
     160
    161161    $members_template = new BP_Core_Members_Template( $type, $page, $per_page, $max, $user_id, $search_terms, $include, (bool)$populate_extras );
    162 
    163     return $members_template->has_members();
     162    return apply_filters( 'bp_has_members', $members_template->has_members(), &$members_template );
    164163}
    165164
Note: See TracChangeset for help on using the changeset viewer.