Skip to:
Content

BuddyPress.org

Ticket #7093: 7093.patch

File 7093.patch, 1.5 KB (added by Offereins, 9 years ago)

Use 'members_search' key in $_REQUEST for group member searches

  • src/bp-groups/bp-groups-template.php

    diff --git a/src/bp-groups/bp-groups-template.php b/src/bp-groups/bp-groups-template.php
    index fdea75c..46e7472 100644
    a b function bp_total_group_count_for_user( $user_id = 0 ) { 
    36063606 *     @type string   $type               Optional. Sort order of results. 'last_joined',
    36073607 *                                        'first_joined', or any of the $type params available in
    36083608 *                                        {@link BP_User_Query}. Default: 'last_joined'.
    3609  *     @type string   $search_terms       Optional. Search terms to match. Pass an
     3609 *     @type string   $search_terms       Optional. Search terms to match. Pass an 
    36103610 *                                        empty string to force-disable search, even in
    3611  *                                        the presence of $_REQUEST['s']. Default: null.
     3611 *                                        the presence of $_REQUEST['members_search'].
     3612 *                                        Default: null.
    36123613 * }
    36133614 *
    36143615 * @return bool
    function bp_group_has_members( $args = '' ) { 
    36353636                'type'                => 'last_joined',
    36363637        ) );
    36373638
    3638         if ( is_null( $r['search_terms'] ) && ! empty( $_REQUEST['s'] ) ) {
    3639                 $r['search_terms'] = $_REQUEST['s'];
     3639        if ( is_null( $r['search_terms'] ) && ! empty( $_REQUEST['members_search'] ) ) {
     3640                $r['search_terms'] = $_REQUEST['members_search'];
    36403641        }
    36413642
    36423643        $members_template = new BP_Groups_Group_Members_Template( $r );