[buddypress-trac] [BuddyPress Trac] #5703: friends_check_friendship_status() doesn't check BP_User_Query
buddypress-trac
noreply at wordpress.org
Sat Jun 14 18:49:57 UTC 2014
#5703: friends_check_friendship_status() doesn't check BP_User_Query
------------------------------+---------------------
Reporter: r-a-y | Owner: r-a-y
Type: enhancement | Status: closed
Priority: normal | Milestone: 2.1
Component: Friends | Version: 1.7
Severity: normal | Resolution: fixed
Keywords: has-patch commit |
------------------------------+---------------------
Changes (by r-a-y):
* owner: => r-a-y
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"8514"]:
{{{
#!CommitTicketReference repository="" revision="8514"
Check `BP_User_Query` when using `friends_check_friendship_status()`.
Previously, `friends_check_friendship_status()` did not reference the data
already queried in the members loop via `BP_User_Query`. As a result, if
a user was logged in and viewing the member directory, this added twenty
additional DB queries to the page.
This commit:
* Adds an additional property - `friendship_status` - to
`bp_friends_filter_user_query_populate_extras()`. This property references
the various friendship statuses from
`BP_Friends_Friendship::check_is_friend()`
* Checks this new property in `friends_check_friendship_status()` before
querying the DB
* Adds unit tests
Props r-a-y, boonebgorges.
Fixes #5703.
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5703#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list