Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/01/2011 07:46:50 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Use bp_get_root_domain() in place of $bp->root_domain global

File:
1 edited

Legend:

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

    r3917 r3982  
    3333
    3434        $reset_steps = true;
    35         bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . '/' );
     35        bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . array_shift( array_keys( $bp->groups->group_creation_steps ) ) . '/' );
    3636    }
    3737
     
    3939    if ( $bp->action_variables[1] && !$bp->groups->group_creation_steps[$bp->action_variables[1]] ) {
    4040        bp_core_add_message( __('There was an error saving group details. Please try again.', 'buddypress'), 'error' );
    41         bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/' );
     41        bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/' );
    4242    }
    4343
     
    6161            if ( empty( $_POST['group-name'] ) || empty( $_POST['group-desc'] ) || !strlen( trim( $_POST['group-name'] ) ) || !strlen( trim( $_POST['group-desc'] ) ) ) {
    6262                bp_core_add_message( __( 'Please fill in all of the required fields', 'buddypress' ), 'error' );
    63                 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     63                bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
    6464            }
    6565
     
    6868            if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $new_group_id, 'name' => $_POST['group-name'], 'description' => $_POST['group-desc'], 'slug' => groups_check_slug( sanitize_title( esc_attr( $_POST['group-name'] ) ) ), 'date_created' => bp_core_current_time(), 'status' => 'public' ) ) ) {
    6969                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    70                 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     70                bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
    7171            }
    7272
     
    9595            if ( !$bp->groups->new_group_id = groups_create_group( array( 'group_id' => $bp->groups->new_group_id, 'status' => $group_status, 'enable_forum' => $group_enable_forum ) ) ) {
    9696                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    97                 bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
     97                bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $bp->groups->current_create_step . '/' );
    9898            }
    9999        }
     
    151151            }
    152152
    153             bp_core_redirect( $bp->root_domain . '/' . $bp->groups->root_slug . '/create/step/' . $next_step . '/' );
     153            bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/create/step/' . $next_step . '/' );
    154154        }
    155155    }
     
    274274        $group = groups_get_groups( array( 'type' => 'random', 'per_page' => 1 ) );
    275275
    276         bp_core_redirect( $bp->root_domain . '/' . $bp->groups->slug . '/' . $group['groups'][0]->slug . '/' );
     276        bp_core_redirect( bp_get_root_domain() . '/' . $bp->groups->slug . '/' . $group['groups'][0]->slug . '/' );
    277277    }
    278278}
Note: See TracChangeset for help on using the changeset viewer.