Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/10/2019 07:57:41 PM (6 years ago)
Author:
boonebgorges
Message:

Nouveau: Fixes for the Friends Request page.

The Friends Request page was introduced in Nouveau with the same dropdown
filter as on other member directories, but the functionality was never
fully implemented. In this changeset, we make the following changes:

  • Ensure that the AJAX request distinguishes between friend request queries and other membership queries, so that the members returned are limited to friend requests.
  • Break the friend request loop logic into its own template, so that the outer template information (title, pagination, etc) doesn't appear twice after an AJAX filter.
  • Modify the logic in the friend-request template so that it uses bp_ajax_querystring(), which lets the filters affect the returned results.

Props imath.
Fixes #8035.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/template-tags.php

    r12279 r12322  
    19891989
    19901990    } else {
     1991        $data_filter = bp_current_component();
     1992        if ( 'friends' === $data_filter && bp_is_user_friend_requests() ) {
     1993            $data_filter = 'friend_requests';
     1994        }
     1995
    19911996        $component['members_select']   = 'members-order-select';
    19921997        $component['members_order_by'] = 'members-order-by';
    19931998        $component['object']           = bp_current_component();
    1994         $component['data_filter']      = bp_current_component();
     1999        $component['data_filter']      = $data_filter;
    19952000    }
    19962001
Note: See TracChangeset for help on using the changeset viewer.