Ticket #5755: 5755.patch
| File 5755.patch, 1.7 KB (added by , 12 years ago) |
|---|
-
bp-xprofile/bp-xprofile-screens.php
108 108 // Certain types of fields (checkboxes, multiselects) may come through empty. Save them as an empty array so that they don't get overwritten by the default on the next edit. 109 109 $value = isset( $_POST['field_' . $field_id] ) ? $_POST['field_' . $field_id] : ''; 110 110 111 if ( !xprofile_set_field_data( $field_id, bp_displayed_user_id(), $value, $is_required[$field_id] ) ) {112 $errors = true;113 } else {114 do_action( 'xprofile_profile_field_data_updated', $field_id, $value );115 }116 117 // Save the visibility level118 111 $visibility_level = !empty( $_POST['field_' . $field_id . '_visibility'] ) ? $_POST['field_' . $field_id . '_visibility'] : 'public'; 119 xprofile_set_field_visibility_level( $field_id, bp_displayed_user_id(), $visibility_level );120 112 121 113 // Save the old and new values. They will be 122 114 // passed to the filter and used to determine … … 129 121 'value' => $value, 130 122 'visibility' => $visibility_level, 131 123 ); 124 125 if ( !xprofile_set_field_data( $field_id, bp_displayed_user_id(), $value, $is_required[$field_id] ) ) { 126 $errors = true; 127 } else { 128 do_action( 'xprofile_profile_field_data_updated', $field_id, $value ); 129 } 130 131 // Save the visibility level 132 xprofile_set_field_visibility_level( $field_id, bp_displayed_user_id(), $visibility_level ); 132 133 } 133 134 134 135 do_action( 'xprofile_updated_profile', bp_displayed_user_id(), $posted_field_ids, $errors, $old_values, $new_values );
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)