Changeset 2784 for trunk/bp-xprofile.php
- Timestamp:
- 02/23/2010 08:55:18 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-xprofile.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile.php
r2770 r2784 725 725 return false; 726 726 727 $field = new BP_XProfile_Field( $field_id ); 728 729 /* Check the value is an acceptable value */ 730 if ( 'checkbox' == $field->type || 'radio' == $field->type || 'selectbox' == $field->type || 'multiselectbox' == $field->type ) { 731 $options = $field->get_children(); 732 733 foreach( $options as $option ) 734 $possible_values[] = $option->name; 735 736 if ( is_array( $value ) ) { 737 foreach( $value as $i => $single ) { 738 if ( !in_array( $single, (array)$possible_values ) ) 739 unset( $value[$i] ); 740 } 741 742 if ( empty( $value ) ) 743 return false; 744 745 /* Reset the keys by merging with an empty array */ 746 $value = array_merge( array(), $value ); 747 } else { 748 if ( !in_array( $value, (array)$possible_values ) ) 749 return false; 750 } 751 } 752 727 753 $field = new BP_XProfile_ProfileData(); 728 754 $field->field_id = $field_id;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)