Skip to:

Opened 10 years ago

Closed 10 years ago

#5746 closed enhancement (fixed)

using bp_group_has_members in widgets and conflicts with $_REQUEST['s']

Reported by: wcuadd's profile WCUADD Owned by: boonebgorges's profile boonebgorges
Milestone: 2.1 Priority: normal
Severity: normal Version:
Component: Groups Keywords: has-patch


Same problem reported in #5318 and fixed with null initialization of $default_args['search_terms'] and is_null() test before assigning $_REQUEST['s'].

This permits to run a secondary members loop in a page (for instance in a widget) while primary loop is whatever loop (buddypress ou wordpress loop) using the search s argument.

While the problem has been solved for the bp_has_members() loop, it has not been solved for bp_group_has_members() loop causing false results (even with fixing search_terms to false in the args array given to the loop).

Attachments (1)

5746.patch (909 bytes) - added by WCUADD 10 years ago.

Download all attachments as: .zip

Change History (4)

10 years ago

10 years ago

  • Keywords has-patch added

#2 @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 2.1
  • Type changed from defect (bug) to enhancement

This looks good. Thanks.

(One small request - in the future, please generate your patch from the root of the buddypress directory. Thanks!)

#3 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 8574:

Only get 'search_terms' out of $_REQUESTs? in bp_group_has_members() if no 'search_terms' param has been passed to the function

This allows secondary, search-free loops to be run on a page, by passing an
empty string to the 'search_terms' param. See #5318 for a similar strategy as
applied to members widgets.

Fixes #5746


Note: See TracTickets for help on using tickets.