Changeset 9936 for trunk/src/bp-xprofile/bp-xprofile-screens.php
- Timestamp:
- 06/11/2015 06:53:59 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-screens.php
r9819 r9936 53 53 function xprofile_screen_edit_profile() { 54 54 55 if ( ! bp_is_my_profile() && !bp_current_user_can( 'bp_moderate' ) )55 if ( ! bp_is_my_profile() && ! bp_current_user_can( 'bp_moderate' ) ) { 56 56 return false; 57 58 $bp = buddypress(); 57 } 59 58 60 59 // Make sure a group is set. 61 if ( !bp_action_variable( 1 ) ) 62 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/1' ) ); 60 if ( ! bp_action_variable( 1 ) ) { 61 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_profile_slug() . '/edit/group/1' ) ); 62 } 63 63 64 64 // Check the field group exists 65 if ( ! bp_is_action_variable( 'group' ) || !xprofile_get_field_group( bp_action_variable( 1 ) ) ) {65 if ( ! bp_is_action_variable( 'group' ) || ! xprofile_get_field_group( bp_action_variable( 1 ) ) ) { 66 66 bp_do_404(); 67 67 return; … … 78 78 79 79 // Check we have field ID's 80 if ( empty( $_POST['field_ids'] ) ) 81 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/' . bp_action_variable( 1 ) ) ); 80 if ( empty( $_POST['field_ids'] ) ) { 81 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_profile_slug() . '/edit/group/' . bp_action_variable( 1 ) ) ); 82 } 82 83 83 84 // Explode the posted field IDs into an array so we know which … … 181 182 182 183 // Redirect back to the edit screen to display the updates and message 183 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . $bp->profile->slug. '/edit/group/' . bp_action_variable( 1 ) ) );184 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_profile_slug() . '/edit/group/' . bp_action_variable( 1 ) ) ); 184 185 } 185 186 } … … 212 213 213 214 // Bail if not the correct screen 214 if ( ! bp_is_my_profile() && !bp_current_user_can( 'bp_moderate' ) )215 if ( ! bp_is_my_profile() && ! bp_current_user_can( 'bp_moderate' ) ) { 215 216 return false; 217 } 216 218 217 219 // Bail if there are action variables … … 223 225 $bp = buddypress(); 224 226 225 if ( ! isset( $bp->avatar_admin ) ) 227 if ( ! isset( $bp->avatar_admin ) ) { 226 228 $bp->avatar_admin = new stdClass(); 229 } 227 230 228 231 $bp->avatar_admin->step = 'upload-image';
Note: See TracChangeset
for help on using the changeset viewer.