Skip to:
Content

BuddyPress.org

Ticket #5781: 5781.03.patch

File 5781.03.patch, 3.0 KB (added by r-a-y, 3 years ago)
  • src/bp-core/bp-core-functions.php

     
    14421442        }
    14431443
    14441444        // Get current time.
    1445         $current_time = bp_core_current_time();
     1445        $current_time = bp_core_current_time( true, 'timestamp' );
    14461446
    14471447        // Use this action to detect the very first activity for a given member.
    14481448        if ( empty( $activity ) ) {
     
    14601460        }
    14611461
    14621462        // If it's been more than 5 minutes, record a newer last-activity time.
    1463         if ( empty( $activity ) || ( strtotime( $current_time ) >= strtotime( '+5 minutes', $activity ) ) ) {
     1463        if ( empty( $activity ) || ( $current_time >= strtotime( '+5 minutes', $activity ) ) ) {
    14641464                bp_update_user_last_activity( $user_id, $current_time );
    14651465        }
    14661466}
  • src/bp-groups/bp-groups-template.php

     
    11171117                 * @param string $value Created date for the current group.
    11181118                 * @param object $group Group object.
    11191119                 */
    1120                 return apply_filters( 'bp_get_group_date_created', bp_core_time_since( strtotime( $group->date_created ) ), $group );
     1120                return apply_filters( 'bp_get_group_date_created', bp_core_time_since( $group->date_created ), $group );
    11211121        }
    11221122
    11231123/**
     
    54345434         *
    54355435         * @param string $value Formatted time since membership was requested.
    54365436         */
    5437         echo apply_filters( 'bp_group_request_time_since_requested', sprintf( __( 'requested %s', 'buddypress' ), bp_core_time_since( strtotime( $requests_template->request->date_modified ) ) ) );
     5437        echo apply_filters( 'bp_group_request_time_since_requested', sprintf( __( 'requested %s', 'buddypress' ), bp_core_time_since( $requests_template->request->date_modified ) ) );
    54385438}
    54395439
    54405440/**
  • src/bp-members/bp-members-template.php

     
    610610                if ( ! empty( $members_template->member->last_activity ) ) {
    611611
    612612                        // Calculate some times.
    613                         $current_time  = strtotime( bp_core_current_time() );
     613                        $current_time  = bp_core_current_time( true, 'timestamp' );
    614614                        $last_activity = strtotime( $members_template->member->last_activity );
    615615                        $still_online  = strtotime( '+5 minutes', $last_activity );
    616616
  • src/bp-xprofile/bp-xprofile-activity.php

     
    307307                 */
    308308                $throttle_period = apply_filters( 'bp_xprofile_updated_profile_activity_throttle_time', HOUR_IN_SECONDS * 2 );
    309309                $then            = strtotime( $existing['activities'][0]->date_recorded );
    310                 $now             = strtotime( bp_core_current_time() );
     310                $now             = bp_core_current_time( true, 'timestamp' );
    311311
    312312                // Bail if throttled.
    313313                if ( ( $now - $then ) < $throttle_period ) {