Skip to:
Content

BuddyPress.org

Ticket #2640: 2640.001.patch

File 2640.001.patch, 856 bytes (added by r-a-y, 14 years ago)

Patch is applicable to the BP 1.2 branch

  • buddypress/bp-xprofile/bp-xprofile-classes.php

     
    114114                        return $groups;
    115115
    116116                /* Fetch the fields */
    117                 $fields = $wpdb->get_results( $wpdb->prepare( "SELECT id, name, description, type, group_id, is_required FROM {$bp->profile->table_name_fields} WHERE group_id IN ( {$group_ids} ) AND parent_id = 0 ORDER BY field_order" ) );
     117                $fields_sql = apply_filters( 'bp_xprofile_fields_sql', "SELECT id, name, description, type, group_id, is_required FROM {$bp->profile->table_name_fields} WHERE group_id IN ( {$group_ids} ) AND parent_id = 0 ORDER BY field_order", $group_ids );
     118
     119                $fields = $wpdb->get_results( $wpdb->prepare( $fields_sql ) );
    118120
    119121                if ( empty( $fields ) )
    120122                        return $groups;