Changeset 2056
- Timestamp:
- 10/26/2009 06:03:11 PM (15 years ago)
- Location:
- branches/1.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1/bp-xprofile.php
r1995 r2056 328 328 /* Loop through the posted fields formatting any datebox values then validate the field */ 329 329 foreach ( $posted_field_ids as $field_id ) { 330 330 331 331 if ( !isset( $_POST['field_' . $field_id] ) ) { 332 333 if ( is set( $_POST['field_' . $field_id . '_day'] ) ) {332 333 if ( is_numeric( $_POST['field_' . $field_id . '_day'] ) ) { 334 334 /* Concatenate the values. */ 335 335 $date_value = $_POST['field_' . $field_id . '_day'] . ' ' . 336 336 $_POST['field_' . $field_id . '_month'] . ' ' . 337 337 $_POST['field_' . $field_id . '_year']; 338 338 339 339 /* Turn the concatenated value into a timestamp */ 340 340 $_POST['field_' . $field_id] = strtotime( $date_value ); 341 341 } 342 342 343 343 } 344 344 345 345 if ( xprofile_check_is_required_field( $field_id ) && empty( $_POST['field_' . $field_id] ) ) 346 346 $errors = true; 347 347 } 348 348 349 349 if ( $errors ) 350 350 bp_core_add_message( __( 'Please make sure you fill in all required fields in this profile field group before saving.', 'buddypress' ), 'error' ); -
branches/1.1/bp-xprofile/bp-xprofile-templatetags.php
r1978 r2056 470 470 471 471 case 'datebox': 472 473 if ( $field->data->value != '') {472 473 if ( !empty( $field->data->value ) ) { 474 474 $day = date("j", $field->data->value); 475 475 $month = date("F", $field->data->value);
Note: See TracChangeset
for help on using the changeset viewer.