Skip to:
Content

BuddyPress.org

Ticket #5425: 5425.diff

File 5425.diff, 1.2 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..407ad56 100644
    class BP_XProfile_User_Admin { 
    607607                                        bp_core_redirect( $redirect_to );
    608608                                }
    609609
    610                                 // 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'] );
     610                                $merge_ids = '';
     611                                foreach ( $_POST['field_ids'] as $ids ) {
     612                                        $merge_ids .= $ids . ',';
     613                                }
     614
     615                                // Explode the posted field IDs into an array so we know which
     616                                // fields have been submitted
     617                                $posted_field_ids = array_filter( wp_parse_id_list( $merge_ids ) );
    612618                                $is_required      = array();
    613619
    614                                 // Loop through the posted fields formatting any datebox values then validate the field
     620                                // Loop through the posted fields formatting any datebox values
     621                                // then validate the field
    615622                                foreach ( (array) $posted_field_ids as $field_id ) {
    616623                                        if ( ! isset( $_POST['field_' . $field_id] ) ) {
    617624                                                if ( ! empty( $_POST['field_' . $field_id . '_day'] ) && ! empty( $_POST['field_' . $field_id . '_month'] ) && ! empty( $_POST['field_' . $field_id . '_year'] ) ) {