Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/13/2016 06:21:10 PM (8 years ago)
Author:
dcavins
Message:

Add query support for hierarchical groups.

Adds a new column to the groups table, parent_id, and support for
querying by parent_id via groups_get_groups() and
bp_has_groups().

Does not add any front-facing hierarchy functionality—that is left for
now to plugins.

Props dcavins, boonebgorges, r-a-y, djpaul, mercime.

See #3961.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-schema.php

    r11093 r11095  
    203203                description longtext NOT NULL,
    204204                status varchar(10) NOT NULL DEFAULT 'public',
     205                parent_id bigint(20) NOT NULL DEFAULT 0,
    205206                enable_forum tinyint(1) NOT NULL DEFAULT '1',
    206207                date_created datetime NOT NULL,
    207208                KEY creator_id (creator_id),
    208                 KEY status (status)
     209                KEY status (status),
     210                KEY parent_id (parent_id)
    209211            ) {$charset_collate};";
    210212
Note: See TracChangeset for help on using the changeset viewer.