Changeset 13503 for trunk/src/bp-xprofile/screens/edit.php
- Timestamp:
- 06/18/2023 04:11:04 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-xprofile/screens/edit.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/screens/edit.php
r13468 r13503 21 21 } 22 22 23 $profile_slug = bp_get_profile_slug();24 $path_chunks = array(25 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ),26 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit', 'edit' ),27 );28 29 30 23 // Make sure a group is set. 31 24 if ( ! bp_action_variable( 1 ) ) { 32 $path_chunks['single_item_action_variables'] = array( bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit_group', 'group' ), 1 ); 33 bp_core_redirect( bp_displayed_user_url( $path_chunks ) ); 25 bp_core_redirect( 26 bp_displayed_user_url( bp_members_get_path_chunks( array( bp_get_profile_slug(), 'edit', array( 'group', 1 ) ) ) ) 27 ); 34 28 } 35 29 … … 41 35 42 36 // No errors. 43 $errors = false; 37 $errors = false; 38 $path_chunks = array( bp_get_profile_slug(), 'edit' ); 44 39 45 40 // Check to see if any new information has been submitted. … … 51 46 // Check we have field ID's. 52 47 if ( empty( $_POST['field_ids'] ) ) { 53 $path_chunks[ 'single_item_action_variables'] = array( bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit_group', 'group' ), bp_action_variable( 1 ) );54 bp_core_redirect( bp_displayed_user_url( $path_chunks) );48 $path_chunks[] = array( 'group', bp_action_variable( 1 ) ); 49 bp_core_redirect( bp_displayed_user_url( bp_members_get_path_chunks( $path_chunks ) ) ); 55 50 } 56 51 … … 165 160 166 161 // Redirect back to the edit screen to display the updates and message. 167 $path_chunks[ 'single_item_action_variables'] = array( bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit_group', 'group' ), bp_action_variable( 1 ) );168 bp_core_redirect( bp_displayed_user_url( $path_chunks) );162 $path_chunks[] = array( 'group', bp_action_variable( 1 ) ); 163 bp_core_redirect( bp_displayed_user_url( bp_members_get_path_chunks( $path_chunks ) ) ); 169 164 } 170 165 }
Note: See TracChangeset
for help on using the changeset viewer.