Skip to:
Content

BuddyPress.org

Changeset 4317


Ignore:
Timestamp:
04/30/2011 05:41:29 PM (13 years ago)
Author:
djpaul
Message:

Remove duplicated check for group forums in the screen code.
Also adds checks to make sure the group's forum is set up and ready to go.

Location:
trunk
Files:
2 edited

Legend:

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

    r4316 r4317  
    105105function groups_screen_group_forum() {
    106106    global $bp, $wp_query;
     107
     108    if ( !bp_is_active( 'forums' ) || !bp_forums_is_installed_correctly() )
     109        return false;
    107110
    108111    if ( bp_is_single_item() && $bp->groups->current_group->user_has_access ) {
  • trunk/bp-themes/bp-default/groups/single/home.php

    r4009 r4317  
    3939                    locate_template( array( 'groups/single/send-invites.php' ), true );
    4040
    41                 elseif ( bp_is_group_forum() && bp_group_is_visible() ) :
    42                     locate_template( array( 'groups/single/forum.php' ), true );
    43 
    4441                elseif ( bp_is_group_membership_request() ) :
    4542                    locate_template( array( 'groups/single/request-membership.php' ), true );
     
    4845                    locate_template( array( 'groups/single/activity.php' ), true );
    4946
    50                 elseif ( bp_group_is_visible() && bp_is_active( 'forums' ) ) :
     47                elseif ( bp_is_group_forum() && bp_group_is_visible() && bp_is_active( 'forums' ) && bp_forums_is_installed_correctly() ) :
    5148                    locate_template( array( 'groups/single/forum.php' ), true );
    5249
Note: See TracChangeset for help on using the changeset viewer.