Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/15/2011 05:23:50 PM (13 years ago)
Author:
boonebgorges
Message:

Applies pre-save filters to permitted xprofile options before comparing with submitted values, to account for special characters. Fixes #3213

File:
1 edited

Legend:

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

    r4351 r4362  
    6767 * @param string $field_value
    6868 * @param int $field_id
     69 * @param bool $reserialize Whether to reserialize arrays before returning. Defaults to true
    6970 * @return string
    7071 */
    71 function xprofile_sanitize_data_value_before_save ( $field_value, $field_id ) {
     72function xprofile_sanitize_data_value_before_save ( $field_value, $field_id, $reserialize = true ) {
    7273
    7374    // Return if empty
     
    9495        }
    9596
    96         $filtered_field_value = serialize( $filtered_values );
     97        if ( $reserialize )
     98            $filtered_field_value = serialize( $filtered_values );
     99        else
     100            $filtered_field_value = $filtered_values;
    97101    }
    98102
Note: See TracChangeset for help on using the changeset viewer.