Changeset 4840 for trunk/bp-xprofile/bp-xprofile-screens.php
- Timestamp:
- 07/24/2011 10:22:55 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile/bp-xprofile-screens.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-screens.php
r4827 r4840 37 37 38 38 // Make sure a group is set. 39 if ( empty( $bp->action_variables[1]) )40 bp_core_redirect( $bp->displayed_user->domain. $bp->profile->slug . '/edit/group/1' );39 if ( !bp_action_variable( 1 ) ) 40 bp_core_redirect( bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/1' ); 41 41 42 42 // Check the field group exists 43 if ( ( !empty( $bp->action_variables[0] ) && 'group' != $bp->action_variables[0] ) || !xprofile_get_field_group( $bp->action_variables[1]) ) {43 if ( !bp_is_action_variable( 'group' ) || !xprofile_get_field_group( bp_action_variable( 1 ) ) ) { 44 44 bp_do_404(); 45 45 return; … … 54 54 // Check we have field ID's 55 55 if ( empty( $_POST['field_ids'] ) ) 56 bp_core_redirect( trailingslashit( $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . $bp->action_variables[1]) );56 bp_core_redirect( trailingslashit( $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . bp_action_variable( 1 ) ) ); 57 57 58 58 // Explode the posted field IDs into an array so we know which … … 68 68 if ( !empty( $_POST['field_' . $field_id . '_day'] ) && is_numeric( $_POST['field_' . $field_id . '_day'] ) ) { 69 69 // Concatenate the values 70 $date_value = $_POST['field_' . $field_id . '_day'] . ' ' . 71 $_POST['field_' . $field_id . '_month'] . ' ' . 72 $_POST['field_' . $field_id . '_year']; 70 $date_value = $_POST['field_' . $field_id . '_day'] . ' ' . $_POST['field_' . $field_id . '_month'] . ' ' . $_POST['field_' . $field_id . '_year']; 73 71 74 72 // Turn the concatenated value into a timestamp … … 116 114 117 115 // Redirect back to the edit screen to display the updates and message 118 bp_core_redirect( trailingslashit( $bp->displayed_user->domain . $bp->profile->slug . '/edit/group/' . $bp->action_variables[1]) );116 bp_core_redirect( trailingslashit( bp_displayed_user_domain() . $bp->profile->slug . '/edit/group/' . bp_action_variable( 1 ) ) ); 119 117 } 120 118 } … … 137 135 return false; 138 136 139 if ( !empty( $bp->action_variables) ) {137 if ( bp_action_variables() ) { 140 138 bp_do_404(); 141 139 return;
Note: See TracChangeset
for help on using the changeset viewer.