Skip to:
Content

BuddyPress.org

Ticket #4891: 4891.diff

File 4891.diff, 753 bytes (added by imath, 13 years ago)
  • bp-xprofile/bp-xprofile-functions.php

     
    370370        $field_value = bp_unserialize_profile_field( $field_value );
    371371
    372372        if ( 'datebox' == $field_type ) {
    373                 $field_value = bp_format_time( $field_value, true );
     373                // If Unix timestamp
     374                if ( is_numeric( $field_value ) ) {
     375                        $field_value = bp_format_time( $field_value, true, false );
     376
     377                // If MySQL timestamp
     378                } else {
     379                        $field_value = bp_format_time( strtotime( $field_value ), true, false );
     380                }
    374381        } else {
    375382                $content = $field_value;
    376383                $field_value = str_replace( ']]>', ']]>', $content );