Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/15/2010 04:43:07 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Use is_super_admin instead of deprecated is_site_admin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-groups.php

    r3186 r3192  
    129129
    130130        /* Using "item" not "group" for generic support in other components. */
    131         if ( is_site_admin() )
     131        if ( is_super_admin() )
    132132            $bp->is_item_admin = 1;
    133133        else
     
    184184            // If this is a private or hidden group, does the user have access?
    185185            if ( 'private' == $bp->groups->current_group->status || 'hidden' == $bp->groups->current_group->status ) {
    186                 if ( $bp->groups->current_group->is_user_member && is_user_logged_in() || is_site_admin() )
     186                if ( $bp->groups->current_group->is_user_member && is_user_logged_in() || is_super_admin() )
    187187                    $bp->groups->current_group->user_has_access = true;
    188188                else
     
    206206
    207207            // If this is a private group, and the user is not a member, show a "Request Membership" nav item.
    208             if ( !is_site_admin() && is_user_logged_in() && !$bp->groups->current_group->is_user_member && !groups_check_for_membership_request( $bp->loggedin_user->id, $bp->groups->current_group->id ) && $bp->groups->current_group->status == 'private' )
     208            if ( !is_super_admin() && is_user_logged_in() && !$bp->groups->current_group->is_user_member && !groups_check_for_membership_request( $bp->loggedin_user->id, $bp->groups->current_group->id ) && $bp->groups->current_group->status == 'private' )
    209209                bp_core_new_subnav_item( array( 'name' => __( 'Request Membership', 'buddypress' ), 'slug' => 'request-membership', 'parent_url' => $group_link, 'parent_slug' => $bp->groups->slug, 'screen_function' => 'groups_screen_group_request_membership', 'position' => 30 ) );
    210210
     
    244244
    245245    /* Don't show this menu to non site admins or if you're viewing your own profile */
    246     if ( !is_site_admin() )
     246    if ( !is_super_admin() )
    247247        return false;
    248248    ?>
     
    370370
    371371                /* Auto join this user if they are not yet a member of this group */
    372                 if ( $bp->groups->auto_join && !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
     372                if ( $bp->groups->auto_join && !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
    373373                    groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id );
    374374
     
    548548
    549549                /* Auto join this user if they are not yet a member of this group */
    550                 if ( $bp->groups->auto_join && !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
     550                if ( $bp->groups->auto_join && !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
    551551                    groups_join_group( $bp->groups->current_group->id, $bp->loggedin_user->id );
    552552
     
    935935    if ( $bp->current_component == $bp->groups->slug && 'delete-group' == $bp->action_variables[0] ) {
    936936
    937         if ( !$bp->is_item_admin && !is_site_admin() )
     937        if ( !$bp->is_item_admin && !is_super_admin() )
    938938            return false;
    939939
     
    19151915
    19161916    /* Be sure the user is a member of the group before posting. */
    1917     if ( !is_site_admin() && !groups_is_user_member( $user_id, $group_id ) )
     1917    if ( !is_super_admin() && !groups_is_user_member( $user_id, $group_id ) )
    19181918        return false;
    19191919
Note: See TracChangeset for help on using the changeset viewer.