Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/11/2012 04:39:44 PM (13 years ago)
Author:
boonebgorges
Message:

Reworks some functions around the querying of friendship requests:

  • Refactors bp_get_friendship_requests() so that it accepts a manual user_id parameter, and so that it falls back on the displayed_user rather than the loggedin_user (for future administrative tasks)
  • Reconfigures the return value of bp_get_friendship_requests() so that a 0 is returned when there are no pending requests, to ensure that a non-false value is passed to bp_has_members() when viewing the Requests page of a user with no pending requests
  • Removes the hardcoded 'return false' from bp_has_members() that would occur when an empty 'include' parameter was passed on the Requests page, so that sidebar widgets using bp_has_members() would work properly
  • Reconfigures the 'include' logic in BP_Core_User::get_users() so that a value of 0 or '0' results in a false result, while continuing to respect legacy behavior of the default false value
  • Fixes #4066
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-template.php

    r5891 r5906  
    314314    if ( !empty( $max ) && ( $per_page > $max ) )
    315315        $per_page = $max;
    316 
    317     // Make sure we return no members if we looking at friendship requests and there are none.
    318     if ( empty( $include ) && bp_is_friends_component() && bp_is_current_action( 'requests' ) )
    319         return false;
    320316
    321317    $members_template = new BP_Core_Members_Template( $type, $page, $per_page, $max, $user_id, $search_terms, $include, (bool)$populate_extras, $exclude, $meta_key, $meta_value, $page_arg );
Note: See TracChangeset for help on using the changeset viewer.