Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/06/2009 03:07:48 AM (17 years ago)
Author:
apeatling
Message:

Converted $bp as an array to $bp as an object. See this post for more info: http://buddypress.org/forums/topic.php?id=1125

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-templatetags.php

    r1015 r1021  
    2828                $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $groups_per_page;
    2929               
    30                 if ( ( $bp['current_action'] == 'my-groups' && $_REQUEST['group-filter-box'] == '' ) || ( !$bp['current_action'] && !isset($_REQUEST['page']) && $_REQUEST['group-filter-box'] == '' ) ) {
    31 
    32                         $order = $bp['action_variables'][0];
     30                if ( ( $bp->current_action == 'my-groups' && empty( $_REQUEST['group-filter-box'] ) ) || ( !$bp->current_action && !isset($_REQUEST['page']) && empty( $_REQUEST['group-filter-box'] ) ) ) {
     31
     32                        $order = $bp->action_variables[0];
    3333                       
    3434                        if ( $order == 'recently-joined' ) {
    35                                 $this->groups = groups_get_recently_joined_for_user( $bp['current_userid'], $this->pag_num, $this->pag_page );
     35                                $this->groups = groups_get_recently_joined_for_user( $bp->displayed_user->id, $this->pag_num, $this->pag_page );
    3636                        } else if ( $order == 'most-popular' ) {
    37                                 $this->groups = groups_get_most_popular_for_user( $bp['current_userid'], $this->pag_num, $this->pag_page );                             
     37                                $this->groups = groups_get_most_popular_for_user( $bp->displayed_user->id, $this->pag_num, $this->pag_page );                           
    3838                        } else if ( $order == 'admin-of' ) {
    39                                 $this->groups = groups_get_user_is_admin_of( $bp['current_userid'], $this->pag_num, $this->pag_page );                         
     39                                $this->groups = groups_get_user_is_admin_of( $bp->displayed_user->id, $this->pag_num, $this->pag_page );                               
    4040                        } else if ( $order == 'mod-of' ) {
    41                                 $this->groups = groups_get_user_is_mod_of( $bp['current_userid'], $this->pag_num, $this->pag_page );                           
     41                                $this->groups = groups_get_user_is_mod_of( $bp->displayed_user->id, $this->pag_num, $this->pag_page );                         
    4242                        } else if ( $order == 'alphabetically' ) {
    43                                 $this->groups = groups_get_alphabetically_for_user( $bp['current_userid'], $this->pag_num, $this->pag_page );   
     43                                $this->groups = groups_get_alphabetically_for_user( $bp->displayed_user->id, $this->pag_num, $this->pag_page );
    4444                        } else {
    45                                 $this->groups = groups_get_recently_active_for_user( $bp['current_userid'], $this->pag_num, $this->pag_page );
     45                                $this->groups = groups_get_recently_active_for_user( $bp->displayed_user->id, $this->pag_num, $this->pag_page );
    4646                        }
    4747
     
    5050                        $this->group_count = count($this->groups);
    5151               
    52                 } else if ( ( $bp['current_action'] == 'my-groups' && $_REQUEST['group-filter-box'] != '' ) || ( !$bp['current_action'] && !isset($_REQUEST['page']) && $_REQUEST['group-filter-box'] != '' ) ) {
     52                } else if ( ( $bp->current_action == 'my-groups' && $_REQUEST['group-filter-box'] != '' ) || ( !$bp->current_action && !isset($_REQUEST['page']) && $_REQUEST['group-filter-box'] != '' ) ) {
    5353
    5454                        $this->groups = groups_filter_user_groups( $_REQUEST['group-filter-box'], $this->pag_num, $this->pag_page );
     
    5757                        $this->group_count = count($this->groups);
    5858               
    59                 } else if ( $bp['current_action'] == 'invites' ) {
     59                } else if ( $bp->current_action == 'invites' ) {
    6060               
    6161                        $this->groups = groups_get_invites_for_user();
     
    8383                        $this->single_group = true;
    8484                       
    85                         $group = new stdClass();
     85                        $group = new stdClass;
    8686                        $group->group_id = BP_Groups_Group::get_id_from_slug($group_slug);
    8787                       
     
    9292                } else {
    9393                       
    94                         $this->groups = groups_get_user_groups( $bp['current_userid'], $this->pag_num, $this->pag_page );
     94                        $this->groups = groups_get_user_groups( $bp->displayed_user->id, $this->pag_num, $this->pag_page );
    9595                        $this->total_group_count = (int)$this->groups['total'];
    9696                        $this->groups = $this->groups['groups'];
     
    167167       
    168168        if ( !$is_single_group ) {
    169                 $groups_template = new BP_Groups_Template( $bp['current_userid'], false, $groups_per_page );
     169                $groups_template = new BP_Groups_Template( $bp->displayed_user->id, false, $groups_per_page );
    170170        } else {
    171                 $groups_template = new BP_Groups_Template( $bp['current_userid'], $group_obj->slug, $groups_per_page );         
     171                $groups_template = new BP_Groups_Template( $bp->displayed_user->id, $group_obj->slug, $groups_per_page );               
    172172        }
    173173       
     
    191191                return true;
    192192        } else {
    193                 if ( groups_is_user_member( $bp['loggedin_userid'], $groups_template->group->id ) ) {
     193                if ( groups_is_user_member( $bp->loggedin_user->id, $groups_template->group->id ) ) {
    194194                        return true;
    195195                }
     
    202202        global $groups_template;
    203203       
    204         if ( $groups_template->group->news == '' )
     204        if ( empty( $groups_template->group->news ) )
    205205                return false;
    206206       
     
    265265        $last_active = groups_get_groupmeta( $groups_template->group->id, 'last_activity' );
    266266       
    267         if ( $last_active == '' )
     267        if ( empty( $last_active ) )
    268268                _e( 'not yet active', 'buddypress' );
    269269        else
     
    278278       
    279279        if ( $echo )
    280                 echo apply_filters( 'bp_group_permalink', $bp['root_domain'] . '/' . $bp['groups']['slug'] . '/' . $group_obj->slug );
     280                echo apply_filters( 'bp_group_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group_obj->slug );
    281281        else
    282                 return apply_filters( 'bp_group_permalink', $bp['root_domain'] . '/' . $bp['groups']['slug'] . '/' . $group_obj->slug );
     282                return apply_filters( 'bp_group_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group_obj->slug );
    283283}
    284284
     
    290290       
    291291        if ( $echo )
    292                 echo apply_filters( 'bp_group_admin_permalink', $bp['root_domain'] . '/' . $bp['groups']['slug'] . '/' . $group_obj->slug . '/admin' );
     292                echo apply_filters( 'bp_group_admin_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group_obj->slug . '/admin' );
    293293        else
    294                 return apply_filters( 'bp_group_admin_permalink', $bp['root_domain'] . '/' . $bp['groups']['slug'] . '/' . $group_obj->slug . '/admin' );       
     294                return apply_filters( 'bp_group_admin_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group_obj->slug . '/admin' );     
    295295}
    296296
     
    480480        global $groups_template, $bp;
    481481
    482         if ( $bp['current_action'] == 'my-groups' || !$bp['current_action'] ) {
    483                 $action = $bp['loggedin_domain'] . $bp['groups']['slug'] . '/my-groups/search/';
     482        if ( $bp->current_action == 'my-groups' || !$bp->current_action ) {
     483                $action = $bp->loggedin_user->domain . $bp->groups->slug . '/my-groups/search/';
    484484                $label = __('Filter Groups', 'buddypress');
    485485                $name = 'group-filter-box';
    486486        } else {
    487                 $action = $bp['loggedin_domain'] . $bp['groups']['slug'] . '/group-finder/search/';
     487                $action = $bp->loggedin_user->domain . $bp->groups->slug . '/group-finder/search/';
    488488                $label = __('Find a Group', 'buddypress');
    489489                $name = 'groupfinder-search-box';
    490                 $value = $bp['action_variables'][0];
     490                $value = $bp->action_variables[0];
    491491        }
    492492?>
    493493        <form action="<?php echo $action ?>" id="group-search-form" method="post">
    494                 <label for="<?php echo $name ?>" id="<?php echo $name ?>-label"><?php echo $label ?> <img id="ajax-loader" src="<?php echo $bp['groups']['image_base'] ?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></label>
     494                <label for="<?php echo $name ?>" id="<?php echo $name ?>-label"><?php echo $label ?> <img id="ajax-loader" src="<?php echo $bp->groups->image_base ?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></label>
    495495                <input type="search" name="<?php echo $name ?>" id="<?php echo $name ?>" value="<?php echo $value ?>"<?php echo $disabled ?> />
    496496                <?php if ( function_exists('wp_nonce_field') )
     
    504504        global $bp;
    505505       
    506         if ( !groups_total_groups_for_user( $bp['current_userid'] ) )
     506        if ( !groups_total_groups_for_user( $bp->displayed_user->id ) )
    507507                return true;
    508508               
     
    715715        global $bp, $groups_template;
    716716       
    717         $current_tab = $bp['action_variables'][0];
     717        $current_tab = $bp->action_variables[0];
    718718?>
    719         <?php if ( $bp['is_item_admin'] || $bp['is_item_mod'] ) { ?>
    720                 <li<?php if ( $current_tab == 'edit-details' || $current_tab == '' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['root_domain'] . '/' . $bp['groups']['slug'] ?>/<?php echo $groups_template->group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li>
     719        <?php if ( $bp->is_item_admin || $bp->is_item_mod ) { ?>
     720                <li<?php if ( $current_tab == 'edit-details' || empty( $current_tab ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/edit-details"><?php _e('Edit Details', 'buddypress') ?></a></li>
    721721        <?php } ?>
    722722
    723         <?php if ( $bp['is_item_admin'] ) { ?> 
    724                 <li<?php if ( $current_tab == 'group-settings' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['root_domain'] . '/' . $bp['groups']['slug'] ?>/<?php echo $groups_template->group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li>
     723        <?php if ( $bp->is_item_admin ) { ?>   
     724                <li<?php if ( $current_tab == 'group-settings' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/group-settings"><?php _e('Group Settings', 'buddypress') ?></a></li>
    725725        <?php } ?>
    726726       
    727         <?php if ( $bp['is_item_admin'] ) { ?> 
    728                 <li<?php if ( $current_tab == 'group-avatar' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['root_domain'] . '/' . $bp['groups']['slug'] ?>/<?php echo $groups_template->group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li>
     727        <?php if ( $bp->is_item_admin ) { ?>   
     728                <li<?php if ( $current_tab == 'group-avatar' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/group-avatar"><?php _e('Group Avatar', 'buddypress') ?></a></li>
    729729        <?php } ?>
    730730
    731         <?php if ( $bp['is_item_admin'] ) { ?>                 
    732                 <li<?php if ( $current_tab == 'manage-members' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['root_domain'] . '/' . $bp['groups']['slug'] ?>/<?php echo $groups_template->group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li>
     731        <?php if ( $bp->is_item_admin ) { ?>                   
     732                <li<?php if ( $current_tab == 'manage-members' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/manage-members"><?php _e('Manage Members', 'buddypress') ?></a></li>
    733733        <?php } ?>
    734734       
    735         <?php if ( $bp['is_item_admin'] && $groups_template->group->status == 'private' ) : ?>
    736         <li<?php if ( $current_tab == 'membership-requests' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['root_domain'] . '/' . $bp['groups']['slug'] ?>/<?php echo $groups_template->group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li>
     735        <?php if ( $bp->is_item_admin && $groups_template->group->status == 'private' ) : ?>
     736        <li<?php if ( $current_tab == 'membership-requests' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/membership-requests"><?php _e('Membership Requests', 'buddypress') ?></a></li>
    737737        <?php endif; ?>
    738738
    739         <?php if ( $bp['is_item_admin'] ) { ?>         
    740                 <li<?php if ( $current_tab == 'delete-group' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['root_domain'] . '/' . $bp['groups']['slug'] ?>/<?php echo $groups_template->group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li>
     739        <?php if ( $bp->is_item_admin ) { ?>           
     740                <li<?php if ( $current_tab == 'delete-group' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->root_domain . '/' . $bp->groups->slug ?>/<?php echo $groups_template->group->slug ?>/admin/delete-group"><?php _e('Delete Group', 'buddypress') ?></a></li>
    741741        <?php } ?>
    742742       
     
    763763                $group = $groups_template->group;
    764764       
    765         if ( groups_check_for_membership_request( $bp['loggedin_userid'], $group->id ) )
     765        if ( groups_check_for_membership_request( $bp->loggedin_user->id, $group->id ) )
    766766                return true;
    767767       
     
    772772        global $bp, $create_group_step, $completed_to_step;
    773773?>
    774         <li<?php if ( $create_group_step == '1' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/create/step/1">1. <?php _e('Group Details', 'buddypress') ?></a></li>
    775         <li<?php if ( $create_group_step == '2' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 0 ) { ?><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/create/step/2">2. <?php _e('Group Settings', 'buddypress') ?></a><?php } else { ?><span>2. <?php _e('Group Settings', 'buddypress') ?></span><?php } ?></li>
    776         <li<?php if ( $create_group_step == '3' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 1 ) { ?><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/create/step/3">3. <?php _e('Group Avatar', 'buddypress') ?></a><?php } else { ?><span>3. <?php _e('Group Avatar', 'buddypress') ?></span><?php } ?></li>
    777         <li<?php if ( $create_group_step == '4' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 2 ) { ?><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/create/step/4">4. <?php _e('Invite Members', 'buddypress') ?></a><?php } else { ?><span>4. <?php _e('Invite Members', 'buddypress') ?></span><?php } ?></li>
     774        <li<?php if ( $create_group_step == '1' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/1">1. <?php _e('Group Details', 'buddypress') ?></a></li>
     775        <li<?php if ( $create_group_step == '2' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 0 ) { ?><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/2">2. <?php _e('Group Settings', 'buddypress') ?></a><?php } else { ?><span>2. <?php _e('Group Settings', 'buddypress') ?></span><?php } ?></li>
     776        <li<?php if ( $create_group_step == '3' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 1 ) { ?><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/3">3. <?php _e('Group Avatar', 'buddypress') ?></a><?php } else { ?><span>3. <?php _e('Group Avatar', 'buddypress') ?></span><?php } ?></li>
     777        <li<?php if ( $create_group_step == '4' ) : ?> class="current"<?php endif; ?>><?php if ( $completed_to_step > 2 ) { ?><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/4">4. <?php _e('Invite Members', 'buddypress') ?></a><?php } else { ?><span>4. <?php _e('Invite Members', 'buddypress') ?></span><?php } ?></li>
    778778<?php
    779779        do_action( 'groups_creation_tabs' );
     
    807807
    808808?>
    809         <form action="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/create/step/<?php echo $create_group_step ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data">
     809        <form action="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/create/step/<?php echo $create_group_step ?>" method="post" id="create-group-form" class="standard-form" enctype="multipart/form-data">
    810810        <?php switch( $create_group_step ) {
    811811                case '1': ?>
     
    907907                               
    908908                                if ( function_exists('friends_install') ) {
    909                                         if ( friends_get_friend_count_for_user( $bp['loggedin_userid'] ) ) {
     909                                        if ( friends_get_friend_count_for_user( $bp->loggedin_user->id ) ) {
    910910                                                bp_group_send_invite_form( $group_obj );
    911911                                        } else {
     
    936936                return false;
    937937
    938                 $friends = friends_get_friends_invite_list( $bp['loggedin_userid'], $group_obj->id );
     938                $friends = friends_get_friends_invite_list( $bp->loggedin_user->id, $group_obj->id );
    939939
    940940                if ( $friends ) {
    941                         $invites = groups_get_invites_for_group( $bp['loggedin_userid'], $group_obj->id );
     941                        $invites = groups_get_invites_for_group( $bp->loggedin_user->id, $group_obj->id );
    942942
    943943        ?>
     
    968968        global $bp, $create_group_step, $completed_to_step;
    969969?>
    970         <li<?php if ( !isset($bp['action_variables'][0]) || $bp['action_variables'][0] == 'recently-active' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/my-groups/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
    971         <li<?php if ( $bp['action_variables'][0] == 'recently-joined' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/my-groups/recently-joined"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li>
    972         <li<?php if ( $bp['action_variables'][0] == 'most-popular' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/my-groups/most-popular""><?php _e( 'Most Popular', 'buddypress' ) ?></a></li>
    973         <li<?php if ( $bp['action_variables'][0] == 'admin-of' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/my-groups/admin-of""><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li>
    974         <li<?php if ( $bp['action_variables'][0] == 'mod-of' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/my-groups/mod-of""><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li>
    975         <li<?php if ( $bp['action_variables'][0] == 'alphabetically' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>/my-groups/alphabetically""><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
     970        <li<?php if ( !isset($bp->action_variables[0]) || $bp->action_variables[0] == 'recently-active' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
     971        <li<?php if ( $bp->action_variables[0] == 'recently-joined' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/recently-joined"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li>
     972        <li<?php if ( $bp->action_variables[0] == 'most-popular' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/most-popular""><?php _e( 'Most Popular', 'buddypress' ) ?></a></li>
     973        <li<?php if ( $bp->action_variables[0] == 'admin-of' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/admin-of""><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li>
     974        <li<?php if ( $bp->action_variables[0] == 'mod-of' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/mod-of""><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li>
     975        <li<?php if ( $bp->action_variables[0] == 'alphabetically' ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>/my-groups/alphabetically""><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
    976976               
    977977<?php
     
    982982        global $bp;
    983983       
    984         $current_filter = $bp['action_variables'][0];
     984        $current_filter = $bp->action_variables[0];
    985985       
    986986        switch ( $current_filter ) {
     
    10091009        global $bp, $groups_template;
    10101010       
    1011         if ( groups_is_user_member( $bp['loggedin_userid'], $groups_template->group->id ) )
     1011        if ( groups_is_user_member( $bp->loggedin_user->id, $groups_template->group->id ) )
    10121012                return true;
    10131013       
     
    10181018        global $groups_template, $bp;
    10191019       
    1020         echo apply_filters( 'bp_group_accept_invite_link', $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites/accept/' . $groups_template->group->id );
     1020        echo apply_filters( 'bp_group_accept_invite_link', $bp->loggedin_user->domain . $bp->groups->slug . '/invites/accept/' . $groups_template->group->id );
    10211021}
    10221022
     
    10241024        global $groups_template, $bp;
    10251025       
    1026         echo apply_filters( 'bp_group_reject_invite_link', $bp['loggedin_domain'] . $bp['groups']['slug'] . '/invites/reject/' . $groups_template->group->id );
     1026        echo apply_filters( 'bp_group_reject_invite_link', $bp->loggedin_user->domain . $bp->groups->slug . '/invites/reject/' . $groups_template->group->id );
    10271027}
    10281028
     
    10331033                return false;
    10341034       
    1035         if ( !friends_check_user_has_friends( $bp['loggedin_userid'] ) || !friends_count_invitable_friends( $bp['loggedin_userid'], $groups_template->group->id ) )
     1035        if ( !friends_check_user_has_friends( $bp->loggedin_user->id ) || !friends_count_invitable_friends( $bp->loggedin_user->id, $groups_template->group->id ) )
    10361036                return false;
    10371037       
     
    10581058?>
    10591059        <div class="left-menu">
    1060                 <h4><?php _e( 'Select Friends', 'buddypress' ) ?> <img id="ajax-loader" src="<?php echo $bp['groups']['image_base'] ?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></h4>
     1060                <h4><?php _e( 'Select Friends', 'buddypress' ) ?> <img id="ajax-loader" src="<?php echo $bp->groups->image_base ?>/ajax-loader.gif" height="7" alt="Loading" style="display: none;" /></h4>
    10611061                <?php bp_group_list_invite_friends() ?>
    10621062                <?php wp_nonce_field( 'invite_user' ) ?>
     
    10701070                </div>
    10711071
    1072                 <?php $invites = groups_get_invites_for_group( $bp['loggedin_userid'], $group_obj->id ) ?>
     1072                <?php $invites = groups_get_invites_for_group( $bp->loggedin_user->id, $group_obj->id ) ?>
    10731073               
    10741074                <ul id="friend-list" class="item-list">
     
    10811081                                        <span class="activity"><?php echo $user->last_active ?></span>
    10821082                                        <div class="action">
    1083                                                 <a class="remove" href="<?php echo site_url() . $bp['groups']['slug'] . '/' . $group_obj->id . '/invites/remove/' . $user->id ?>" id="uid-<?php echo $user->id ?>"><?php _e( 'Remove Invite', 'buddypress' ) ?></a>
     1083                                                <a class="remove" href="<?php echo site_url() . $bp->groups->slug . '/' . $group_obj->id . '/invites/remove/' . $user->id ?>" id="uid-<?php echo $user->id ?>"><?php _e( 'Remove Invite', 'buddypress' ) ?></a>
    10841084                                        </div>
    10851085                                </li>
     
    10971097                <img src="<?php echo $group_obj->avatar_full ?>" alt="Group Avatar" class="avatar" />
    10981098        <?php } else { ?>
    1099                 <img src="<?php echo $bp['groups']['image_base'] . '/none.gif' ?>" alt="No Group Avatar" class="avatar" />
     1099                <img src="<?php echo $bp->groups->image_base . '/none.gif' ?>" alt="No Group Avatar" class="avatar" />
    11001100        <?php }
    11011101}
     
    11221122       
    11231123        // If they're not logged in or are banned from the group, no join button.
    1124         if ( !is_user_logged_in() || groups_is_user_banned( $bp['loggedin_userid'], $group->id ) )
     1124        if ( !is_user_logged_in() || groups_is_user_banned( $bp->loggedin_user->id, $group->id ) )
    11251125                return false;
    11261126       
     
    11291129        switch ( $group->status ) {
    11301130                case 'public':
    1131                         if ( BP_Groups_Member::check_is_member( $bp['loggedin_userid'], $group->id ) )
     1131                        if ( BP_Groups_Member::check_is_member( $bp->loggedin_user->id, $group->id ) )
    11321132                                echo '<a class="leave-group" href="' . bp_group_permalink( $group, false ) . '/leave-group">' . __('Leave Group', 'buddypress') . '</a>';                                                                       
    11331133                        else
     
    11361136               
    11371137                case 'private':
    1138                         if ( BP_Groups_Member::check_is_member( $bp['loggedin_userid'], $group->id ) ) {
     1138                        if ( BP_Groups_Member::check_is_member( $bp->loggedin_user->id, $group->id ) ) {
    11391139                                echo '<a class="leave-group" href="' . bp_group_permalink( $group, false ) . '/leave-group">' . __('Leave Group', 'buddypress') . '</a>';                                                                               
    11401140                        } else {
     
    12141214        global $bp;
    12151215       
    1216         $group_ids = BP_Groups_Member::get_random_groups( $bp['current_userid'] );
     1216        $group_ids = BP_Groups_Member::get_random_groups( $bp->displayed_user->id );
    12171217?>     
    12181218        <div class="info-group">
    1219                 <h4><?php bp_word_or_name( __( "My Groups", 'buddypress' ), __( "%s's Groups", 'buddypress' ) ) ?> (<?php echo BP_Groups_Member::total_group_count() ?>) <a href="<?php echo $bp['current_domain'] . $bp['groups']['slug'] ?>"><?php _e('See All', 'buddypress') ?> &raquo;</a></h4>
     1219                <h4><?php bp_word_or_name( __( "My Groups", 'buddypress' ), __( "%s's Groups", 'buddypress' ) ) ?> (<?php echo BP_Groups_Member::total_group_count() ?>) <a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>"><?php _e('See All', 'buddypress') ?> &raquo;</a></h4>
    12201220                <?php if ( $group_ids ) { ?>
    12211221                        <ul class="horiz-gallery">
     
    14111411        global $bp;
    14121412       
    1413         if ( $bp['current_action'] == 'group-finder' )
     1413        if ( $bp->current_action == 'group-finder' )
    14141414                echo apply_filters( 'bp_group_reject_invite_link', 'groupfinder-pag' );
    14151415        else
Note: See TracChangeset for help on using the changeset viewer.