Changeset 9466 for trunk/src/bp-groups/bp-groups-actions.php
- Timestamp:
- 02/09/2015 11:34:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-actions.php
r9451 r9466 107 107 if ( !bp_user_can_create_groups() ) { 108 108 bp_core_add_message( __( 'Sorry, you are not allowed to create groups.', 'buddypress' ), 'error' ); 109 bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug()) );109 bp_core_redirect( bp_get_groups_directory_permalink() ); 110 110 } 111 111 … … 124 124 $reset_steps = true; 125 125 $keys = array_keys( $bp->groups->group_creation_steps ); 126 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . array_shift( $keys ) . '/');126 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . array_shift( $keys ) ) ); 127 127 } 128 128 … … 130 130 if ( bp_get_groups_current_create_step() && empty( $bp->groups->group_creation_steps[bp_get_groups_current_create_step()] ) ) { 131 131 bp_core_add_message( __('There was an error saving group details. Please try again.', 'buddypress'), 'error' ); 132 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/');132 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create' ) ); 133 133 } 134 134 … … 145 145 if ( ! bp_is_group_creator( $bp->groups->current_group, bp_loggedin_user_id() ) ) { 146 146 bp_core_add_message( __( 'Only the group creator may continue editing this group.', 'buddypress' ), 'error' ); 147 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/');147 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create' ) ); 148 148 } 149 149 } … … 158 158 if ( empty( $_POST['group-name'] ) || empty( $_POST['group-desc'] ) || !strlen( trim( $_POST['group-name'] ) ) || !strlen( trim( $_POST['group-desc'] ) ) ) { 159 159 bp_core_add_message( __( 'Please fill in all of the required fields', 'buddypress' ), 'error' ); 160 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');160 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . bp_get_groups_current_create_step() ) ); 161 161 } 162 162 … … 165 165 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' ) ) ) { 166 166 bp_core_add_message( __( 'There was an error saving group details. Please try again.', 'buddypress' ), 'error' ); 167 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');167 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . bp_get_groups_current_create_step() ) ); 168 168 } 169 169 } … … 189 189 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 ) ) ) { 190 190 bp_core_add_message( __( 'There was an error saving group details. Please try again.', 'buddypress' ), 'error' ); 191 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_get_groups_current_create_step() . '/');191 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . bp_get_groups_current_create_step() ) ); 192 192 } 193 193 … … 295 295 } 296 296 297 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . $next_step . '/');297 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/' . $next_step ) ); 298 298 } 299 299 } … … 314 314 315 315 bp_core_add_message( $message, $error ); 316 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/group-invites/');316 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . 'create/step/group-invites' ) ); 317 317 } 318 318 … … 488 488 $group = BP_Groups_Group::get_random( 1, 1 ); 489 489 490 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group['groups'][0]->slug . '/');490 bp_core_redirect( trailingslashit( bp_get_groups_directory_permalink() . $group['groups'][0]->slug ) ); 491 491 } 492 492 }
Note: See TracChangeset
for help on using the changeset viewer.