[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
Mon Jan 9 23:01:15 UTC 2017
#6431: get_group_extras function doesn't "respects" the user_id variable from
groups_get_groups() function
--------------------------+-----------------------
Reporter: lenasterg | Owner: dcavins
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 2.8
Component: Groups | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+-----------------------
Changes (by dcavins):
* keywords: has-unit-tests needs-patch => has-patch
Comment:
I revisited this ticket and the provided patches, and the changes in BP2.7
(removing the `populate_extras` flag from `BP_Groups_Group::get()`)
largely solved this problem. Now, groups that are fetched via
`BP_Groups_Group::get()` are real `BP_Groups_Group` objects and support
lazy loading the "extras" that used to be handled by
`BP_Groups_Group::get_group_extras()`. However, some one-off methods that
directly query the groups table still do not return `BP_Groups_Group`
objects, and rely on `get_group_extras()`:
* `BP_Groups_Group::get_by_most_forum_topics()`
* `BP_Groups_Group::get_by_most_forum_posts()`
* `BP_Groups_Group::get_by_letter()`
* `BP_Groups_Group::get_random()`
For the legacy-forum-related functions, I'd like to propose an approach
where we return real `BP_Groups_Group` objects so we can forget about
`get_group_extras()`. See attached patch.
See #7419 where I suggest we change `BP_Groups_Group::get_by_letter()` and
`BP_Groups_Group::get_random()` to use `BP_Groups_Group::get()`.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6431#comment:19>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list