Changeset 3982 for trunk/bp-groups/bp-groups-actions.php
- Timestamp:
- 02/01/2011 07:46:50 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-actions.php
r3917 r3982 33 33 34 34 $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 ) ) . '/' ); 36 36 } 37 37 … … 39 39 if ( $bp->action_variables[1] && !$bp->groups->group_creation_steps[$bp->action_variables[1]] ) { 40 40 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/' ); 42 42 } 43 43 … … 61 61 if ( empty( $_POST['group-name'] ) || empty( $_POST['group-desc'] ) || !strlen( trim( $_POST['group-name'] ) ) || !strlen( trim( $_POST['group-desc'] ) ) ) { 62 62 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 . '/' ); 64 64 } 65 65 … … 68 68 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' ) ) ) { 69 69 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 . '/' ); 71 71 } 72 72 … … 95 95 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 ) ) ) { 96 96 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 . '/' ); 98 98 } 99 99 } … … 151 151 } 152 152 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 . '/' ); 154 154 } 155 155 } … … 274 274 $group = groups_get_groups( array( 'type' => 'random', 'per_page' => 1 ) ); 275 275 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 . '/' ); 277 277 } 278 278 }
Note: See TracChangeset
for help on using the changeset viewer.