Skip to:
Content

BuddyPress.org

Changeset 3192


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

Location:
branches/1.2
Files:
24 edited

Legend:

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

    r3186 r3192  
    174174        return false;
    175175
    176     if ( !is_site_admin() )
     176    if ( !is_super_admin() )
    177177        $bp->is_item_admin = false;
    178178
     
    187187        return false;
    188188
    189     if ( !is_site_admin() )
     189    if ( !is_super_admin() )
    190190        $bp->is_item_admin = false;
    191191
     
    197197    global $bp;
    198198
    199     if ( !is_site_admin() )
     199    if ( !is_super_admin() )
    200200        $bp->is_item_admin = false;
    201201
     
    207207    global $bp;
    208208
    209     if ( !is_site_admin() )
     209    if ( !is_super_admin() )
    210210        $bp->is_item_admin = false;
    211211
     
    356356
    357357    /* Check access */
    358     if ( !is_site_admin() && $activity->user_id != $bp->loggedin_user->id )
     358    if ( !is_super_admin() && $activity->user_id != $bp->loggedin_user->id )
    359359        return false;
    360360
  • branches/1.2/bp-activity/bp-activity-templatetags.php

    r3174 r3192  
    576576
    577577        /* Add the delete link if the user has permission on this item */
    578         if ( ( is_user_logged_in() && $activities_template->activity->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || $bp->loggedin_user->is_site_admin )
     578        if ( ( is_user_logged_in() && $activities_template->activity->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || $bp->loggedin_user->is_super_admin )
    579579             $content .= apply_filters( 'bp_activity_delete_link', ' · ' . bp_get_activity_delete_link(), &$activities_template->activity );
    580580
     
    660660
    661661                /* Delete link */
    662                 if ( $bp->loggedin_user->is_site_admin || $bp->loggedin_user->id == $comment->user_id )
     662                if ( $bp->loggedin_user->is_super_admin || $bp->loggedin_user->id == $comment->user_id )
    663663                    $content .= ' &middot; <a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/?cid=' . $comment->id, 'bp_activity_delete_link' ) . '" class="delete acomment-delete">' . __( 'Delete', 'buddypress' ) . '</a>';
    664664
  • branches/1.2/bp-blogs.php

    r3186 r3192  
    5555
    5656    /* Only create the bp-blogs tables if this is a multisite install */
    57     if ( is_site_admin() && bp_core_is_multisite() ) {
     57    if ( is_super_admin() && bp_core_is_multisite() ) {
    5858        /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */
    5959        if ( get_site_option( 'bp-blogs-db-version' ) < BP_BLOGS_DB_VERSION )
  • branches/1.2/bp-blogs/bp-blogs-classes.php

    r3139 r3192  
    7676            bp_blogs_setup_globals();
    7777
    78         if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
     78        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    7979            $hidden_sql = "AND wb.public = 1";
    8080
     
    210210
    211211        // If the user is logged in return the blog count including their hidden blogs.
    212         if ( ( is_user_logged_in() && $user_id == $bp->loggedin_user->id ) || is_site_admin() )
     212        if ( ( is_user_logged_in() && $user_id == $bp->loggedin_user->id ) || is_super_admin() )
    213213            return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT b.blog_id) FROM {$bp->blogs->table_name} b LEFT JOIN {$wpdb->base_prefix}blogs wb ON b.blog_id = wb.blog_id WHERE wb.deleted = 0 AND wb.spam = 0 AND wb.mature = 0 AND wb.archived = '0' AND user_id = %d", $user_id) );
    214214        else
     
    224224        $filter = like_escape( $wpdb->escape( $filter ) );
    225225
    226         if ( !is_site_admin() )
     226        if ( !is_super_admin() )
    227227            $hidden_sql = "AND wb.public = 1";
    228228
     
    242242            bp_blogs_setup_globals();
    243243
    244         if ( !is_site_admin() )
     244        if ( !is_super_admin() )
    245245            $hidden_sql = "AND wb.public = 1";
    246246
     
    262262        $letter = like_escape( $wpdb->escape( $letter ) );
    263263
    264         if ( !is_site_admin() )
     264        if ( !is_super_admin() )
    265265            $hidden_sql = "AND wb.public = 1";
    266266
  • branches/1.2/bp-core.php

    r3186 r3192  
    107107    $bp->loggedin_user->userdata = bp_core_get_core_userdata( $bp->loggedin_user->id );
    108108
    109     /* is_site_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop. */
    110     $bp->loggedin_user->is_site_admin = is_site_admin();
     109    /* is_super_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop. */
     110    $bp->loggedin_user->is_super_admin = is_super_admin();
    111111
    112112    /* The user id of the user currently being viewed, set in /bp-core/bp-core-catchuri.php */
     
    269269 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
    270270 * @global $current_user WordPress global variable containing current logged in user information
    271  * @uses is_site_admin() returns true if the current user is a site admin, false if not
     271 * @uses is_super_admin() returns true if the current user is a site admin, false if not
    272272 * @uses get_site_option() fetches the value for a meta_key in the wp_sitemeta table
    273273 * @uses bp_core_install() runs the installation of DB tables for the core component
     
    276276    global $bp;
    277277
    278     if ( !is_site_admin() )
     278    if ( !is_super_admin() )
    279279        return false;
    280280
     
    294294 * @package BuddyPress Core
    295295 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
    296  * @uses is_site_admin() returns true if the current user is a site admin, false if not
     296 * @uses is_super_admin() returns true if the current user is a site admin, false if not
    297297 * @uses add_submenu_page() WP function to add a submenu item
    298298 */
    299299function bp_core_add_admin_menu() {
    300     if ( !is_site_admin() )
     300    if ( !is_super_admin() )
    301301        return false;
    302302
     
    431431    global $bp, $wpdb, $wp_version;
    432432
    433     if ( !is_site_admin() || bp_is_my_profile() || !$bp->displayed_user->id )
     433    if ( !is_super_admin() || bp_is_my_profile() || !$bp->displayed_user->id )
    434434        return false;
    435435
     
    499499    global $bp;
    500500
    501     if ( !is_site_admin() || bp_is_my_profile() || !$bp->displayed_user->id )
     501    if ( !is_super_admin() || bp_is_my_profile() || !$bp->displayed_user->id )
    502502        return false;
    503503
     
    681681
    682682    /* If this is for site admins only and the user is not one, don't create the subnav item */
    683     if ( $site_admin_only && !is_site_admin() )
     683    if ( $site_admin_only && !is_super_admin() )
    684684        return false;
    685685
     
    818818
    819819    /* If this is for site admins only and the user is not one, don't create the subnav item */
    820     if ( $site_admin_only && !is_site_admin() )
     820    if ( $site_admin_only && !is_super_admin() )
    821821        return false;
    822822
     
    17151715 * @package BuddyPress Core
    17161716 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
    1717  * @uses is_site_admin() Checks to see if the user is a site administrator.
     1717 * @uses is_super_admin() Checks to see if the user is a site administrator.
    17181718 * @uses wpmu_delete_user() Deletes a user from the system on multisite installs.
    17191719 * @uses wp_delete_user() Deletes a user from the system on singlesite installs.
     
    17311731
    17321732    /* Site admins cannot be deleted */
    1733     if ( is_site_admin( bp_core_get_username( $user_id ) ) )
     1733    if ( is_super_admin( bp_core_get_username( $user_id ) ) )
    17341734        return false;
    17351735
     
    20052005        return false;
    20062006
    2007     if ( !is_site_admin() )
     2007    if ( !is_super_admin() )
    20082008        return false;
    20092009
  • branches/1.2/bp-core/bp-core-catchuri.php

    r3144 r3192  
    246246    /* If this user has been marked as a spammer and the logged in user is not a site admin, redirect. */
    247247    if ( isset( $bp->displayed_user->id ) && bp_core_is_user_spammer( $bp->displayed_user->id ) ) {
    248         if ( !is_site_admin() )
     248        if ( !is_super_admin() )
    249249            bp_core_redirect( $bp->root_domain );
    250250        else
  • branches/1.2/bp-core/bp-core-filters.php

    r3144 r3192  
    4444    global $bp, $current_blog;
    4545
    46     if ( !is_site_admin() )
     46    if ( !is_super_admin() )
    4747        return $themes;
    4848
  • branches/1.2/bp-core/bp-core-settings.php

    r3146 r3192  
    2222    bp_core_new_subnav_item( array( 'name' => __( 'Notifications', 'buddypress' ), 'slug' => 'notifications', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_notification_settings', 'position' => 20, 'user_has_access' => bp_is_my_profile() ) );
    2323
    24     if ( !is_site_admin() && !(int) $bp->site_options['bp-disable-account-deletion'] )
     24    if ( !is_super_admin() && !(int) $bp->site_options['bp-disable-account-deletion'] )
    2525        bp_core_new_subnav_item( array( 'name' => __( 'Delete Account', 'buddypress' ), 'slug' => 'delete-account', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_delete_account', 'position' => 90, 'user_has_access' => bp_is_my_profile() ) );
    2626}
  • branches/1.2/bp-core/bp-core-templatetags.php

    r3160 r3192  
    13581358    global $bp;
    13591359
    1360     if ( is_site_admin() || is_user_logged_in() && $bp->loggedin_user->id == $bp->displayed_user->id )
     1360    if ( is_super_admin() || is_user_logged_in() && $bp->loggedin_user->id == $bp->displayed_user->id )
    13611361        $has_access = true;
    13621362    else
  • branches/1.2/bp-core/bp-core-wpabstraction.php

    r3161 r3192  
    9191}
    9292
    93 if ( !function_exists( 'is_site_admin' ) ) {
    94     function is_site_admin( $user_id = false ) {
     93if ( !function_exists( 'is_super_admin' ) ) {
     94    function is_super_admin( $user_id = false ) {
    9595        if ( current_user_can( 'manage_options' ) )
    9696            return true;
  • branches/1.2/bp-forums.php

    r3145 r3192  
    6969            if ( $bp->groups->current_group = groups_get_group( array( 'group_id' => $_POST['topic_group_id'] ) ) ) {
    7070                /* Auto join this user if they are not yet a member of this group */
    71                 if ( !is_site_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
     71                if ( !is_super_admin() && 'public' == $bp->groups->current_group->status && !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) )
    7272                    groups_join_group( $bp->groups->current_group->id, $bp->groups->current_group->id );
    7373
     
    9595    global $bp;
    9696
    97     if ( !is_site_admin() )
     97    if ( !is_super_admin() )
    9898        return false;
    9999
  • branches/1.2/bp-forums/bp-forums-templatetags.php

    r3143 r3192  
    557557        $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit Topic', 'buddypress' ) . '</a>';
    558558
    559         if ( $bp->is_item_admin || $bp->is_item_mod || is_site_admin() ) {
     559        if ( $bp->is_item_admin || $bp->is_item_mod || is_super_admin() ) {
    560560            if ( 0 == (int)$forum_template->topic->topic_sticky )
    561561                $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky Topic', 'buddypress' ) . '</a>';
  • branches/1.2/bp-friends.php

    r3186 r3192  
    5555    global $bp;
    5656
    57     if ( !is_site_admin() )
     57    if ( !is_super_admin() )
    5858        return false;
    5959
  • 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
  • branches/1.2/bp-groups/bp-groups-classes.php

    r3181 r3192  
    205205        }
    206206
    207         if ( !is_site_admin() )
     207        if ( !is_super_admin() )
    208208            $hidden_sql = "AND status != 'hidden'";
    209209
     
    264264            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    265265
    266         if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
     266        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    267267            $hidden_sql = "AND g.status != 'hidden'";
    268268
     
    296296            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    297297
    298         if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
     298        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    299299            $hidden_sql = "AND g.status != 'hidden'";
    300300
     
    329329        }
    330330
    331         if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
     331        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    332332            $hidden_sql = "AND g.status != 'hidden'";
    333333
     
    361361            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    362362
    363         if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
     363        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    364364            $hidden_sql = " AND g.status != 'hidden'";
    365365
     
    397397        }
    398398
    399         if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
     399        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    400400            $hidden_sql = " AND g.status != 'hidden'";
    401401
     
    433433        }
    434434
    435         if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
     435        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    436436            $hidden_sql = " AND g.status != 'hidden'";
    437437
     
    470470            $where_conditions[] = $wpdb->prepare( "g.status = 'public'" );
    471471
    472         if ( !is_site_admin() )
     472        if ( !is_super_admin() )
    473473            $where_conditions[] = $wpdb->prepare( "g.status != 'hidden'");
    474474
     
    517517        }
    518518
    519         if ( !is_site_admin() )
     519        if ( !is_super_admin() )
    520520            $hidden_sql = $wpdb->prepare( " AND status != 'hidden'");
    521521
     
    544544            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    545545
    546         if ( !is_user_logged_in() || ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
     546        if ( !is_user_logged_in() || ( !is_super_admin() && ( $user_id != $bp->loggedin_user->id ) ) )
    547547            $hidden_sql = "AND g.status != 'hidden'";
    548548
     
    605605        global $wpdb, $bp;
    606606
    607         if ( !is_site_admin() )
     607        if ( !is_super_admin() )
    608608            $hidden_sql = "WHERE status != 'hidden'";
    609609
     
    881881            $user_id = $bp->displayed_user->id;
    882882
    883         if ( $user_id != $bp->loggedin_user->id && !is_site_admin() ) {
     883        if ( $user_id != $bp->loggedin_user->id && !is_super_admin() ) {
    884884            return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND g.status != 'hidden' AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $user_id ) );
    885885        } else {
  • branches/1.2/bp-groups/bp-groups-filters.php

    r2765 r3192  
    9393    global $bp;
    9494
    95     if ( is_site_admin() )
     95    if ( is_super_admin() )
    9696        return true;
    9797
  • branches/1.2/bp-groups/bp-groups-templatetags.php

    r3179 r3192  
    193193    global $bp, $groups_template;
    194194
    195     if ( $bp->loggedin_user->is_site_admin )
     195    if ( $bp->loggedin_user->is_super_admin )
    196196        return true;
    197197
     
    968968 * Checks if current user is member of a group.
    969969 *
    970  * @uses is_site_admin Check if current user is super admin
     970 * @uses is_super_admin Check if current user is super admin
    971971 * @uses apply_filters Creates bp_group_is_member filter and passes $is_member
    972972 * @usedby groups/activity.php, groups/single/forum/edit.php, groups/single/forum/topic.php to determine template part visibility
     
    980980
    981981    // Site admins always have access
    982     if ( is_site_admin() )
     982    if ( is_super_admin() )
    983983        return true;
    984984
  • branches/1.2/bp-messages.php

    r3186 r3192  
    9090    global $bp;
    9191
    92     if ( !is_site_admin() )
     92    if ( !is_super_admin() )
    9393        return false;
    9494
     
    117117    bp_core_new_subnav_item( array( 'name' => __( 'Compose', 'buddypress' ), 'slug' => 'compose', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_compose', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) );
    118118
    119     if ( is_site_admin() )
    120         bp_core_new_subnav_item( array( 'name' => __( 'Notices', 'buddypress' ), 'slug' => 'notices', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_notices', 'position' => 90, 'user_has_access' => is_site_admin() ) );
     119    if ( is_super_admin() )
     120        bp_core_new_subnav_item( array( 'name' => __( 'Notices', 'buddypress' ), 'slug' => 'notices', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_notices', 'position' => 90, 'user_has_access' => is_super_admin() ) );
    121121
    122122    if ( $bp->current_component == $bp->messages->slug ) {
     
    201201    global $bp, $notice_id;
    202202
    203     if ( !is_site_admin() )
     203    if ( !is_super_admin() )
    204204        return false;
    205205
     
    286286    $thread_id = $bp->action_variables[0];
    287287
    288     if ( !$thread_id || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access($thread_id) && !is_site_admin() ) )
     288    if ( !$thread_id || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access($thread_id) && !is_super_admin() ) )
    289289        bp_core_redirect( $bp->displayed_user->domain . $bp->current_component );
    290290
     
    488488
    489489function messages_send_notice( $subject, $message ) {
    490     if ( !is_site_admin() || empty( $subject ) || empty( $message ) ) {
     490    if ( !is_super_admin() || empty( $subject ) || empty( $message ) ) {
    491491        return false;
    492492    } else {
  • branches/1.2/bp-messages/bp-messages-templatetags.php

    r3156 r3192  
    158158    extract( $r, EXTR_SKIP );
    159159
    160     if ( 'notices' == $bp->current_action && !is_site_admin() ) {
     160    if ( 'notices' == $bp->current_action && !is_super_admin() ) {
    161161        wp_redirect( $bp->displayed_user->id );
    162162    } else {
  • branches/1.2/bp-themes/bp-default/_inc/ajax.php

    r3145 r3192  
    217217
    218218    /* Check access */
    219     if ( !is_site_admin() && $activity->user_id != $bp->loggedin_user->id )
     219    if ( !is_super_admin() && $activity->user_id != $bp->loggedin_user->id )
    220220        return false;
    221221
     
    250250
    251251    /* Check access */
    252     if ( !is_site_admin() && $comment->user_id != $bp->loggedin_user->id )
     252    if ( !is_super_admin() && $comment->user_id != $bp->loggedin_user->id )
    253253        return false;
    254254
  • branches/1.2/bp-themes/bp-default/functions.php

    r3171 r3192  
    9090/* Hijack the saving of page on front setting to save the activity stream setting */
    9191function bp_dtheme_page_on_front_update( $oldvalue, $newvalue ) {
    92     if ( !is_admin() || !is_site_admin() )
     92    if ( !is_admin() || !is_super_admin() )
    9393        return false;
    9494
  • branches/1.2/bp-themes/bp-default/groups/create.php

    r2767 r3192  
    5353                            </div>
    5454                        <?php else : ?>
    55                             <?php if ( is_site_admin() ) : ?>
     55                            <?php if ( is_super_admin() ) : ?>
    5656                                <div class="checkbox">
    5757                                    <label><input type="checkbox" disabled="disabled" name="disabled" id="disabled" value="0" /> <?php printf( __('<strong>Attention Site Admin:</strong> Group forums require the <a href="%s">correct setup and configuration</a> of a bbPress installation.', 'buddypress' ), bp_get_root_domain() . '/wp-admin/admin.php?page=bb-forums-setup' ) ?></label>
  • branches/1.2/bp-themes/bp-default/members/single/messages/compose.php

    r2191 r3192  
    1111    </ul>
    1212
    13     <?php if ( is_site_admin() ) : ?>
     13    <?php if ( is_super_admin() ) : ?>
    1414        <input type="checkbox" id="send-notice" name="send-notice" value="1" /> <?php _e( "This is a notice to all users.", "buddypress" ) ?>
    1515    <?php endif; ?>
  • branches/1.2/bp-xprofile.php

    r3186 r3192  
    132132 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
    133133 * @global $wpdb WordPress DB access object.
    134  * @uses is_site_admin() returns true if the current user is a site admin, false if not
     134 * @uses is_super_admin() returns true if the current user is a site admin, false if not
    135135 * @uses bp_xprofile_install() runs the installation of DB tables for the xprofile component
    136136 * @uses wp_enqueue_script() Adds a JS file to the JS queue ready for output
     
    142142    global $wpdb, $bp;
    143143
    144     if ( !is_site_admin() )
     144    if ( !is_super_admin() )
    145145        return false;
    146146
     
    207207
    208208    /* Don't show this menu to non site admins or if you're viewing your own profile */
    209     if ( !is_site_admin() || bp_is_my_profile() )
     209    if ( !is_super_admin() || bp_is_my_profile() )
    210210        return false;
    211211    ?>
     
    268268    global $bp;
    269269
    270     if ( !bp_is_my_profile() && !is_site_admin() )
     270    if ( !bp_is_my_profile() && !is_super_admin() )
    271271        return false;
    272272
     
    358358    global $bp;
    359359
    360     if ( !bp_is_my_profile() && !is_site_admin() )
     360    if ( !bp_is_my_profile() && !is_super_admin() )
    361361        return false;
    362362
     
    427427    check_admin_referer( 'bp_delete_avatar_link' );
    428428
    429     if ( !bp_is_my_profile() && !is_site_admin() )
     429    if ( !bp_is_my_profile() && !is_super_admin() )
    430430        return false;
    431431
Note: See TracChangeset for help on using the changeset viewer.