Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/06/2010 04:24:57 PM (14 years ago)
Author:
apeatling
Message:

Merging 1.2 branch with trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile/bp-xprofile-templatetags.php

    r2911 r3232  
    343343        global $field;
    344344
    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 );
    350346    }
    351347
     
    375371
    376372                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);
    379374
    380375                    /* 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];
    386379                    }
    387380
Note: See TracChangeset for help on using the changeset viewer.