Changeset 3232 for trunk/bp-xprofile/bp-xprofile-templatetags.php
- Timestamp:
- 09/06/2010 04:24:57 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-xprofile/bp-xprofile-templatetags.php
r2911 r3232 343 343 global $field; 344 344 345 $array_box = false; 346 if ( 'multiselectbox' == $field->type ) 347 $array_box = '[]'; 348 349 return apply_filters( 'bp_get_the_profile_field_input_name', 'field_' . $field->id . $array_box ); 345 return apply_filters( 'bp_get_the_profile_field_input_name', 'field_' . $field->id ); 350 346 } 351 347 … … 375 371 376 372 for ( $k = 0; $k < count($options); $k++ ) { 377 $option_values = maybe_unserialize( BP_XProfile_ProfileData::get_value_byid( $options[$k]->parent_id ) ); 378 $option_values = (array)$option_values; 373 $option_value = BP_XProfile_ProfileData::get_value_byid($options[$k]->parent_id); 379 374 380 375 /* Check for updated posted values, but errors preventing them from being saved first time */ 381 foreach( (array)$option_values as $i => $option_value ) { 382 if ( isset( $_POST['field_' . $field->id] ) && $_POST['field_' . $field->id] != $option_value ) { 383 if ( !empty( $_POST['field_' . $field->id] ) ) 384 $option_values[$i] = $_POST['field_' . $field->id]; 385 } 376 if ( isset( $_POST['field_' . $field->id] ) && $option_value != $_POST['field_' . $field->id] ) { 377 if ( !empty( $_POST['field_' . $field->id] ) ) 378 $option_value = $_POST['field_' . $field->id]; 386 379 } 387 380
Note: See TracChangeset
for help on using the changeset viewer.