[buddypress-trac] [BuddyPress Trac] #3961: Hierarchical groups
buddypress-trac
noreply at wordpress.org
Tue Sep 13 02:51:19 UTC 2016
#3961: Hierarchical groups
------------------------------------+-----------------------
Reporter: sooskriszta | Owner: dcavins
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.7
Component: Groups | Version:
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+-----------------------
Comment (by boonebgorges):
Thanks, @dcavins! A couple more things (one of which is caused by my
previous suggestion ;) )
- In `BP_Groups_Group::get()`, you're checking to see whether `parent_id`
is `null`. But the default value you're passing through to the rest of the
chain - `bp_has_groups()` etc - is `false`. This is going to get converted
to a `0` for the query, which is not what we want. The null value should
either be `null` or `false`, but it needs to be consistent.
- In `bp_groups_update_orphaned_groups_on_group_delete()` (and maybe
elsewhere?) you do this:
{{{
$grandparent_group_id = ! empty( $group->parent_id ) ? $group->parent_id :
0;
}}}
We should enforce that group objects have a numeric `parent_id`
(`populate()`). This way, the only way `parent_id` could be `empty` is if
it's `0`, in which case you can skip the check and say
`$grandparent_group_id = $group->parent_id`.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3961#comment:61>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list