Skip to:
Content

BuddyPress.org

Ticket #5425: 5425.03.diff

File 5425.03.diff, 1.1 KB (added by imath, 11 years ago)
  • bp-xprofile/bp-xprofile-admin.php

    diff --git bp-xprofile/bp-xprofile-admin.php bp-xprofile/bp-xprofile-admin.php
    index 99dcfd8..1c275db 100644
    class BP_XProfile_User_Admin { 
    607607                                        bp_core_redirect( $redirect_to );
    608608                                }
    609609
     610                                /**
     611                                 * Unlike front-end edit-fields screens, the wp-admin/profile displays all
     612                                 * groups of fields on a single page, so the list of field ids is an array
     613                                 * gathering for each group of fields a distinct comma separated list of ids.
     614                                 * As a result, before using the wp_parse_id_list() function, we must ensure
     615                                 * that these ids are "merged" into a single comma separated list.
     616                                 */
     617                                $merge_ids = join( ',', $_POST['field_ids'] );
     618
    610619                                // Explode the posted field IDs into an array so we know which fields have been submitted
    611                                 $posted_field_ids = wp_parse_id_list( $_POST['field_ids'] );
     620                                $posted_field_ids = wp_parse_id_list( $merge_ids );
    612621                                $is_required      = array();
    613622
    614623                                // Loop through the posted fields formatting any datebox values then validate the field