Skip to:
Content

BuddyPress.org

Ticket #2348: demo1.patch

File demo1.patch, 1.2 KB (added by DJPaul, 14 years ago)

sample

  • bp-core/admin/bp-core-schema.php

     
    147147                           ) {$charset_collate};";
    148148
    149149        dbDelta($sql);
     150
     151        $role =& get_role( 'administrator' );
     152        if ( !empty( $role ) )
     153                $role->add_cap( 'bp_manage_groups' );
    150154}
    151155
    152156function bp_core_install_private_messaging() {
  • bp-groups.php

     
    5050                $bp->groups->current_group = new BP_Groups_Group( $group_id );
    5151
    5252                /* Using "item" not "group" for generic support in other components. */
    53                 if ( is_site_admin() )
     53                if ( is_site_admin() || current_user_can( 'bp_manage_groups' ) )
    5454                        $bp->is_item_admin = 1;
    5555                else
    56                         $bp->is_item_admin = groups_is_user_admin( $bp->loggedin_user->id, $bp->groups->current_group->id );
     56                        $bp->is_item_admin = groups_is_user_admin( $bp->loggedin_user->id, $bp->groups->current_group->id;
    5757
    5858                /* If the user is not an admin, check if they are a moderator */
    5959                if ( !$bp->is_item_admin )