[buddypress-trac] [BuddyPress Trac] #6431: get_group_extras function doesn't "respects" the user_id variable from groups_get_groups() function
buddypress-trac
noreply at wordpress.org
Sat Dec 5 20:08:29 UTC 2015
#6431: get_group_extras function doesn't "respects" the user_id variable from
groups_get_groups() function
--------------------------------------------+------------------
Reporter: lenasterg | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.5
Component: Component - Groups | Version:
Severity: normal | Resolution:
Keywords: has-patch early has-unit-tests |
--------------------------------------------+------------------
Changes (by Mamaduka):
* keywords: has-patch needs-unit-tests early => has-patch early has-unit-
tests
Comment:
[attachment:6431.diff] includes refresh for the previous patch also
optimization for `BP_Groups_Group::get_group_extras()` method. Previously
it was triggering two DB queries which now is combined into one, also
remove few extra loops.
Not sure why values where assigned this way before, compared to
`BP_Group_Member_Query::populate_group_member_extras()` where values as
casted integers. Later makes more sense and is much nicer way to handle.
P.S. `$type` arg was never used in this method, at least since it was
introduce r2533 (this is as far as I was able to trace down in Git logs).
Maybe it would be better to deprecate it.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6431#comment:4>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list